Re: Add timeline to partial WAL segments - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: Add timeline to partial WAL segments
Date
Msg-id 20181214235627.GC5012@paquier.xyz
Whole thread Raw
In response to Re: Add timeline to partial WAL segments  (David Steele <david@pgmasters.net>)
Responses Re: Add timeline to partial WAL segments  (David Steele <david@pgmasters.net>)
List pgsql-hackers
On Fri, Dec 14, 2018 at 06:05:18PM -0500, David Steele wrote:
> On 12/14/18 3:26 PM, Robert Haas wrote:
>> The new TLI is the only thing that is guaranteed to be unique with
>> each new promotion, and I would guess that it is therefore the right
>> thing to use to disambiguate them.
>
> This is the conclusion we came to after a few months of diagnosing and
> working on this problem.

Hm.  Okay.  From that point of view I think that we should also make
pg_receivewal able to generate the same kind of segment format when it
detects a timeline switch for the last partial segment of the previous
timeline.  Switching to a new timeline makes the streaming finish, so we
could use that to close properly the WAL segment with the new name.  At
the same time it would be nice to have a macro able to generate a
partial segment name and also check after it.

> The question in my mind: is it safe to back-patch?

That's unfortunately a visibility change, meaning that any existing
backup solution able to handle .partial segments would get broken in a
minor release.  From that point of view this should go only on HEAD.
The other patch to reorder the priority of the .ready files could go
down without any problem though.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Andrew Gierth
Date:
Subject: Re: Variable-length FunctionCallInfoData
Next
From: Michael Paquier
Date:
Subject: Re: Change pgarch_readyXlog() to return .history files first