Re: invalid data in file backup_label problem on windows - Mailing list pgsql-hackers

From David Steele
Subject Re: invalid data in file backup_label problem on windows
Date
Msg-id cc035f09-ef7b-0270-f8bc-e895507ffa34@pgmasters.net
Whole thread Raw
In response to RE: invalid data in file backup_label problem on windows  ("Wang, Shenhao" <wangsh.fnst@cn.fujitsu.com>)
List pgsql-hackers
On 1/14/21 10:50 PM, Wang, Shenhao wrote:
> 
>> Please feel free to, under the section "Bug fixes".  This way, it
>> won't get lost in the traffic of this list.
>> --
>> Michael
> 
> Thank you for your advise, added it

I'm not sure how I feel about this patch (not really a Windows person)  
but I do think that you shouldn't modify the backup_label when writing  
it, i.e. you should be writing backup_label in binary mode to avoid this  
issue.

No objections from me if it gets committed but I'm not sure it should be  
classified as a "bug fix" since the backup_label was modified from what  
postgres provided, unless I am misunderstanding.

Regards,
-- 
-David
david@pgmasters.net



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: a verbose option for autovacuum
Next
From: Tomas Vondra
Date:
Subject: Re: cleanup temporary files after crash