Re: invalid data in file backup_label problem on windows

David Steele <david@pgmasters.net>

From: David Steele <david@pgmasters.net>
To: "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>
Cc: Michael Paquier <michael@paquier.xyz>
Date: 2021-03-18T16:39:06Z
Lists: 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



Commits

  1. doc: Clarify how to generate backup files with non-exclusive backups