Re: Postgresql Hata

From: Can Şirin <sirincan(at)itu(dot)edu(dot)tr>
To: pgsql-tr-genel(at)postgresql(dot)org
Subject: Re: Postgresql Hata
Date: 2017-08-14 18:08:43
Message-ID: 20170814210843.Horde.ZaE7QvZdPwxR7kS5AeVGwQ1@webmail.itu.edu.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-tr-genel

Yeniden merhaba,

Tahminimin aksine dönüş değer 0'dan farklı olan komut, test değil cp
komutuymuş demekki. Arşivlenen wal segmentlerinin kaydı pg_xlog dizini
altındaki archive_status dizininde saklanıyor. Bu dizinin altında .done
ile biten dosya en son hangi wal segmentinin arşivlendiğini, .ready ile
biten dosyalarda arşivlenecek olan dosyaları temsil ediyor.

Fakat bu noktada o dizinin içeriğine doğrudan müdahele etmeyle iligli
tecrübem yok. Grupta bu konuda daha tecrübeli arkadaşlar belki daha net
cevap verebilirler ama o dizinin içeriğinin uygun hale getirilip
arşivlemenin sıradaki dosyadan devam ettirilmesi gerektiğini
düşünüyorum. Bir test ortamınız varsa doğrudan
pg_xlog/archive_status dizininin içeriğini güncelleyip, servisi restart
ederek bir deneme yapabilirsiniz.

İyi çalışmalar

Can Şirin

Quoting Fırat Güleç <firat(dot)gulec(at)hepsiexpress(dot)com>:

> Merhaba Can,
>
>  
>
> Dönüşün için tesekkur ederim. Bahsettiğin move daha önce de
dosyanın
> ismini rename yaparak denemiştim. Fakat bir değişen olmamıştı.
Şimdi de
> bahsettiğin gibi aşağıdaki komutu çalıştırdım. Bir değişiklik
olmadı.
> Alttaki hataları almaya devam ediyor.
>
>  
>
> /mv -v
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
> /root/
>
>  
>
> p: cannot stat 'pg_xlog/000000010000000700000065.00000028.backup': No
> such file or directory
>
> 2017-08-14 15:21:49 +03 [8898-38767] LOG:  archive command failed
> with exit code 1
>
> 2017-08-14 15:21:49 +03 [8898-38768] DETAIL:  The failed archive
> command was: test ! -f
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
&& cp pg_xlog/000000010000000700000065.00000028.backup
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
>
> cp: cannot stat 'pg_xlog/000000010000000700000065.00000028.backup':
> No such file or directory
>
> 2017-08-14 15:21:50 +03 [8898-38769] LOG:  archive command failed
> with exit code 1
>
> 2017-08-14 15:21:50 +03 [8898-38770] DETAIL:  The failed archive
> command was: test ! -f
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
&& cp pg_xlog/000000010000000700000065.00000028.backup
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
>
> cp: cannot stat 'pg_xlog/000000010000000700000065.00000028.backup':
> No such file or directory
>
> 2017-08-14 15:21:51 +03 [8898-38771] LOG:  archive command failed
> with exit code 1
>
> 2017-08-14 15:21:51 +03 [8898-38772] DETAIL:  The failed archive
> command was: test ! -f
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
&& cp pg_xlog/000000010000000700000065.00000028.backup
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
>
> 2017-08-14 15:21:51 +03 [8898-38773] WARNING:  archiving transaction
> log file "000000010000000700000065.00000028.backup" failed too many
> times, will try again later
>
>  
>
> İyi çalışmalar.
>
>  
>
> FROM: pgsql-tr-genel-owner(at)postgresql(dot)org
> [mailto:pgsql-tr-genel-owner(at)postgresql(dot)org] ON BEHALF OF Can Sirin
> SENT: Friday, August 11, 2017 10:40 AM
> TO: pgsql-tr-genel(at)postgresql(dot)org
> SUBJECT: Re: [pgsql-tr-genel] Postgresql Hata
>
>  
>
> Merhaba,
>
> Logda belirtildiği üzere arşivleme komutunun dönüş değeri 0
olmadığı
> için arşivleme yapılamamış. Muhtemelen
>
> //var/lib/postgresql/pg_log_archive//
>
> dizininde
>
> /000000010000000700000065.00000028.backup/
>
> isimli bir dosya hali hazırda mevcut ve bu yüzden de test komutu 1
> dönüyor. Bu dosyayı o dizinden farklı bir yere taşıyın. Arşivleme
> komutunun başarılı çalışacaktır. Zaten ardından pg_xlog dizininde
> biriken wal segmentleri kendiliğinden archive dizinine taşınmış
olacak.
>
> Özetle, aşağıdaki komutu çalıştırırsanız arşivleme
kendilğinden devam
> edecektir.
>
> /mv -v
>
/var/lib/postgresql/pg_log_archive/000000010000000700000065.00000028.backup
> /root/
>
> İyi çalışmalar
>
> Can Şirin
>
> Quoting Fırat Güleç <firat(dot)gulec(at)hepsiexpress(dot)com>:
>
>> Merhabalar,
>>
>>  
>>
>> Hepsiexpress ailesi olarak aranıza katılmaktan mutluluk
duyuyoruz.
>> Size sormak istediğim bir konu var.
>>
>> TEST ORTAMıNDA RECOVERING USING A CONTINUOUS ARCHIVE BACKUP[1]
>> IşLEMI YAPTığıMDA BAşARıLı BIR şEKILDE RECOVERY YAPTıM. FAKAT
LOG
>> DOSYALARıNDA SüREKLI EKTEKI HATALARı BASMAYA BAşLADı VE ARTıK DAHA
öNCE
>> ARCHIEVE’LERI SAKLAMAK ICIN BELIRLEDIğIM
>> “/VAR/LIB/POSTGRESQL/PG_LOG_ARCHIVE” PATHINDE HIC DOSYA OLUşMUYOR.
>> DEFAULT OLARAK “/VAR/LIB/POSTGRESQL/9.5/MAIN/PG_XLOG” PATH’INDE
>> OLUşUYOR. ARAşTıRMA YAPTığıMDA RESTORE IşLEMINDEN SONRA BU
şEKILDE
>> HATALARıN ALıNABILECEğINDEN BAHSEDEN LINKLERE RASTLADıM. 1. LINKTEKI
>>  EN ALTTA BELIRTTIğIM RESOLUTION’I YAPTıM FAKAT HATA DüZELMEDI.
HENüZ
>> BARMAN VEYA STANDBY GIBI BIR SUNUCUMUZ YOK.
>>
HTTPS://WWW.POSTGRESQL.ORG/DOCS/9.5/STATIC/CONTINUOUS-ARCHIVING.HTML#BACKUP-PITR-RECOVERY-->
SETTING UP WAL ARCHIVING[1]’E GöRE AYARLARı
>> YAPTıM.
>>
>>  
>>
>>  
>>
>>
>>
1-http://documentation.commvault.com/commvault/v10/article?p=products/postgresql/restore_troubleshooting.htm
>>
>>  
>>
>>
>>
2-https://stackoverflow.com/questions/17444379/postgresql-9-2-archiving-last-replayed-wal-after-recovery
>>
>>  
>>
>>
>>
3-/message-id/CAL4HELd1H_1dANNDazPb4TGWVMdxWWEeECPjABUuTZn6n4rn0Q%40mail.gmail.com
>>
>>  
>>
>>  
>>
>>  
>>
>>  
>>
>> RESOLUTION
>>
>> This error does not interfere with the backups and restores
>> performed by the software, hence you can ignore them.
>>
>> However, restarting the PostgreSQL Server will eliminate these
>> warnings in the future.
>>
>> To avoid the warnings, use the archive command without the test
>> utility as shown in the example below.
>>
>> archive_command = 'cp %p /opt/PostgreSQL/9.1/archive_dir/%f'
>>
>> For more information on running a correct archive command,
>> see PSQL0005[2].
>>
>>  
>>
>> İyi çalışmalar.
>>
>>  
>>
>>  
>>
>>  
>>
>> FIRAT GÜLEÇ 
>> Veritabanı Yöneticisi
>> firat(dot)gulec(at)hepsiexpress(dot)com
>>
>>  
>>
>> M: 0 532 210 57 18 
>> İnönü Mh. Mimar Sinan Cd. No:3 Güzeller Org.San.Bölg. GEBZE /
KOCAELİ
>>
>> -------------------------
>>
>>
>>
>>  
>
>  

Links:
------
[1]
[2]
http://documentation.commvault.com/commvault/v10/article?p=products/postgresql/backup_troubleshooting.htm#psql0005

In response to

Responses

Browse pgsql-tr-genel by date

  From Date Subject
Next Message Fırat Güleç 2017-08-15 06:21:34 Re: Postgresql Hata
Previous Message Fırat Güleç 2017-08-14 12:25:03 Re: Postgresql Hata