On Wed, Sep 16, 2015 at 7:28 PM, Peter Eisentraut <pete...@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 -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers