Re: BUG #14109: pg_rewind fails to update target control file in one scenario - Mailing list pgsql-bugs

From Michael Paquier
Subject Re: BUG #14109: pg_rewind fails to update target control file in one scenario
Date
Msg-id CAB7nPqTKnqVOEEpTgFVXP-hO6dvzo=xv5G4Ek0E+A1ttLGakPw@mail.gmail.com
Whole thread Raw
In response to Re: BUG #14109: pg_rewind fails to update target control file in one scenario  (John Lumby <johnlumby@hotmail.com>)
Responses Re: BUG #14109: pg_rewind fails to update target control file in one scenario
List pgsql-bugs
On Tue, Apr 26, 2016 at 10:37 PM, John Lumby <johnlumby@hotmail.com> wrote:
> I wrote:
>> One way to take care of this class of
>> problems is to use wal_keep_segments. An even better one is called
>> replication slot.
>
> Regarding replication slots  --   Actually I do use them (I think it is unsafe to run
> streaming replication without either archiving or a replication slot)
> but even that would still not guarantee success
> if I did not take the precaution of shutting down current primary first before flip.
>
> And  ..   we discussed this very point in pqsql-general just a month ago  --
>
> http://www.postgresql.org/message-id/COL131-W804D45E77B0D0FB1EF08B1A3890@phx.gbl

My memory is so short-lived lately... I did not recall that :)

> I did not get any answer to my suggestion in that post but I think it might be useful.

Replication slots are perfectly able to retain WAL segments from a
prior timeline, so I am not sure that this would be much a gain. And
as they can be used as well on standbys you could create/drop slots on
it at regular intervals. Or more simply use a WAL archive.
--
Michael

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: BUG #14016: Incomplete documentation of IN subquery expression
Next
From: Michael Paquier
Date:
Subject: Re: BUG #14109: pg_rewind fails to update target control file in one scenario