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 appending zeroes 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_receivewal to 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 create a 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

Reply via email to