Re: Streaming replication and WAL archive interactions - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: Streaming replication and WAL archive interactions
Date
Msg-id 554CB84E.3070406@iki.fi
Whole thread Raw
In response to Re: Streaming replication and WAL archive interactions  (Michael Paquier <michael.paquier@gmail.com>)
Responses Re: Streaming replication and WAL archive interactions  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On 04/22/2015 10:07 AM, Michael Paquier wrote:
> On Wed, Apr 22, 2015 at 3:38 PM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> I feel that the best approach is to archive the last, partial segment, but
>> with the .partial suffix. I don't see any plausible real-wold setup where
>> the current behavior would be better. I don't really see much need to
>> archive the partial segment at all, but there's also no harm in doing it, as
>> long as it's clearly marked with the .partial suffix.
>
> Well, as long as it is clearly archived at promotion, even with a
> suffix, I guess that I am fine... This will need some tweaking on
> restore_command for existing applications, but as long as it is
> clearly documented I am fine. Shouldn't this be a different patch
> though?

Ok, I came up with the attached, which adds the .partial suffix to the
partial WAL segment that's archived after promotion. I couldn't find any
natural place to talk about it in the docs, though. I think after the
docs changes from the main patch are applied, it would be natural to
mention this in the "Continuous archiving in standby", so I think I'll
add that later.

Barring objections, I'll push this later tonight.

Now that we got this last-partial-segment problem out of the way, I'm
going to try fixing the problem you (Michael) pointed out about relying
on pgstat file. Meanwhile, I'd love to get more feedback on the rest of
the patch, and the documentation.

- Heikki


Attachment

pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: Broken --dry-run mode in pg_rewind
Next
From: Simon Riggs
Date:
Subject: Re: subxcnt defined as signed integer in SnapshotData and SerializeSnapshotData