some pg_rewind usability issues

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: some pg_rewind usability issues
Date: 2015-09-17 02:28:07
Message-ID: 55FA2537.4070600@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

?

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Petr Jelinek 2015-09-17 02:36:11 Re: Sequence Access Method WIP
Previous Message Haribabu Kommi 2015-09-17 02:15:35 Re: Parallel Seq Scan