some pg_rewind usability issues - Mailing list pgsql-hackers

From Peter Eisentraut
Subject some pg_rewind usability issues
Date
Msg-id 55FA2537.4070600@gmx.net
Whole thread Raw
Responses Re: some pg_rewind usability issues  (Robert Haas <robertmhaas@gmail.com>)
Re: some pg_rewind usability issues  (Michael Paquier <michael.paquier@gmail.com>)
List pgsql-hackers
pg_rewind --source-server uses the libpq default mechanisms for the
database, but that's useless for pg_rewind, which can just always use
dbname=postgres, like other database-agnostic utilities.


pg_rewind requires that the target server be shut down cleanly, but does
not accept shutdown in recovery.  Is that necessary?

I have been trying to come with a kind of typical workflow for this
tool, which goes something like this:

- have a target server that I'd like to reattach to a new source server
- write recovery.conf file
- start target server; sometimes this works without pg_rewind -> happy
- otherwise run pg_rewind, which fails because of shutdown in recovery
- remove recovery.conf, start server, stop server
- run pg_rewind again
- put back recovery.conf
- start server

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.

Could we change this to:

- not delete recovery.conf
- not copy recovery.done

?



pgsql-hackers by date:

Previous
From: Haribabu Kommi
Date:
Subject: Re: Parallel Seq Scan
Next
From: Petr Jelinek
Date:
Subject: Re: Sequence Access Method WIP