Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

Поиск
Список
Период
Сортировка
От Cary Huang
Тема Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory
Дата
Msg-id 164876406444.1182.11596302572557875100.pgcf@coridan.postgresql.org
обсуждение исходный текст
Ответ на Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory  (SATYANARAYANA NARLAPURAM <satyanarlapuram@gmail.com>)
Список pgsql-hackers
Hello

pg_receivewal creates this .partial WAL file during WAL streaming and it is already treating this file as a temporary
file.It will fill this .partial file with zeroes up to 16777216 by default before streaming real WAL data on it. 
 

If your .partial file is only 8396800 bytes, then this could mean that pg_receivewal is terminated abruptly while it is
appendingzeroes or your system runs out of disk space. Do you have any error message? 
 

If this is case, the uninitialized .partial file should still be all zeroes, so it should be ok to delete it and have
pg_receivewalto recreate a new .partial file.
 

Also, in your patch, you are using pad_to_size argument in function dir_open_for_write to determine if it needs to
createa temp file, but I see that this function is always given a pad_to_size  = 16777216 , and never 0. Am I missing
something?

Cary Huang
===========
HighGo Software Canada

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jacob Champion
Дата:
Сообщение: Re: [PATCH] Expose port->authn_id to extensions and triggers
Следующее
От: Justin Pryzby
Дата:
Сообщение: Re: head fails to build on SLES 12 (wal_compression=zstd)