Re: Continue work on changes to recovery.conf API

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: Sergei Kornilov <sk(at)zsrv(dot)org>, PostgreSQL mailing lists <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Continue work on changes to recovery.conf API
Date: 2018-11-21 06:00:12
Message-ID: 20181121060012.GE1951@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Nov 20, 2018 at 12:07:12PM +0100, Peter Eisentraut wrote:
> I went over the patch and did a bunch of small refinements. I have also
> updated the documentation more extensively. The attached patch is
> committable to me.

Thanks for putting energy into that.

> Recovery is now initiated by a file recovery.signal. Standby mode is
> initiated by a file standby.signal. The standby_mode setting is
> gone. If a recovery.conf file is found, an error is issued.

I am having second thoughts about this part of the patch actually.
What's bad in keeping standby_mode and just rely on recovery.signal to
enforce recovery to happen? When the startup process starts all the
parameters should be loaded. That would also need less work from users
to switch to the new APIs. I think that there could be a point to
*merge* hot_standby and standby_mode actually into an enum, so keeping
standby_mode would help with that (not this patch work of course). The
barrier between recovery.trigger standby.trigger is also rather thin.

> The trigger_file setting has been renamed to promote_trigger_file as
> part of the move.

This rename looks fine.

> pg_basebackup -R now appends settings to postgresql.auto.conf and
> creates a standby.signal file.
>
> Author: Simon Riggs <simon(at)2ndquadrant(dot)com>
> Author: Abhijit Menon-Sen <ams(at)2ndquadrant(dot)com>
> Author: Sergei Kornilov <sk(at)zsrv(dot)org>

I think that Fujii Masao should also be listed as an author, or at least
get a mention. He was one of the first to work on this stuff.

Using separate GUCs for each target is fine by me. I would have thought
that 003_recovery_targets.pl needed some tweaks, so I am happy to see
that it is not the case.

So overall this stuff looks fine per its shape, just the part for
standby.signal may not justify breaking compatibility more than
necessary... The first mention of this part comes from
https://postgr.es/m/CANP8+jLoYSDjB5ip7wynVcckoE4OynHabUnB8pQMgBJgFKQpiw@mail.gmail.com
as far as I know.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2018-11-21 07:09:41 Re: A WalSnd issue related to state WALSNDSTATE_STOPPING
Previous Message Hironobu SUZUKI 2018-11-21 05:51:34 Re: row filtering for logical replication