Re: some pg_rewind usability issues - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: some pg_rewind usability issues
Date
Msg-id CAB7nPqTpdPQnnh-H8ihvcmOs1orHf8bHyYj9cfCs5XQRUGsKbA@mail.gmail.com
Whole thread Raw
In response to some pg_rewind usability issues  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: some pg_rewind usability issues  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
On Wed, Sep 16, 2015 at 7:28 PM, Peter Eisentraut <peter_e@gmx.net> wrote:
> pg_rewind requires that the target server be shut down cleanly, but does
> not accept shutdown in recovery.  Is that necessary?
> [blah]
> If I patch pg_rewind to allow shutdown in recovery, it goes slightly
> easier, but it will delete my recovery.conf file and instead copy over
> the recovery.done file from the other guy, which can lead to some confusion.

That's something that we discussed in this CF's patch to ease the
handling of timeline switches when rewinding a node, I wouldn't have
any objection to get that backpatched to 9.5 though (the
DB_SHUTDOWNED_IN_RECOVERY part I mean).

> Could we change this to:
> - not delete recovery.conf
> - not copy recovery.done
> ?

The implementation of pg_rewind took the direction of not having any
filtering routines when comparing the source and target files to
simplify the implementation (there are actually many similar things
with what pg_basebackup needs so we'd better perhaps have a common API
for both things in say src/common if we take that direction), user
needing to copy by himself in an external path any configuration files
that he needs back in the target's PGDATA.
-- 
Michael



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: some pg_rewind usability issues
Next
From: Michael Paquier
Date:
Subject: Re: Improving test coverage of extensions with pg_dump