From: Michael Paquier <michael@paquier.xyz>
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
Cc: Sergei Kornilov <sk@zsrv.org>
Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Subject: Re: Continue work on changes to recovery.conf API
Date: Thu, 22 Nov 2018 10:09:51 +0900
Message-ID: <20181122010951.GC3369@paquier.xyz> (raw)
In-Reply-To: <617a69c1-1a6c-4423-26e2-616877d842cf@2ndquadrant.com>
References: <1312381535557435@iva1-a2ffb02749cf.qloud-c.yandex.net>
<22e02b05-cd56-6a6b-962d-6d35995827a5@2ndquadrant.com>
<1876591538256580@iva1-5148b5385b62.qloud-c.yandex.net>
<943181539360922@iva4-24c534b4e3ac.qloud-c.yandex.net>
<32159921540906216@myt5-9da6df248f4a.qloud-c.yandex.net>
<51a6446c-c2b6-b653-c9f5-da38e23ddd9d@2ndquadrant.com>
<22367601542121030@iva5-d3020dc3459d.qloud-c.yandex.net>
<2d1877b6-e8cf-a27c-4608-c40758dd0f6c@2ndquadrant.com>
<20181121060012.GE1951@paquier.xyz>
<617a69c1-1a6c-4423-26e2-616877d842cf@2ndquadrant.com>
On Wed, Nov 21, 2018 at 12:58:19PM +0100, Peter Eisentraut wrote:
> This wasn't my idea, so this is just my interpretation. The scenario
> I'm wondering about is: You have a standby. So (under your system) you
> set standby_mode=on and create recovery.trigger. Then you promote that
> standby, so recovery.trigger is removed, but standby_mode=on stays.
> Much time passes. At some point you want to do a PITR on that instance.
> So you create a recovery.trigger, set some recovery parameters. But
> you didn't notice that standby_mode=on is still set from way back when
> -- and you create a mess.
>
> One way to think about it is: Being a standby is a state, not a
> configuration setting.
Very good point, I have not thought of this problem from this
perspective. Indeed that can be confusing. Now things get reset
once recovery.conf is renamed.
> Btw., I'm not in love with the *.signal naming. I originally argued
> against naming them *.trigger, but I don't like the alternative either.
> But that's easy to change if someone has a better idea.
Using "recovery" or "signal" would be more consistent with the existing
"promote" but that does not feel good either. "trigger" does not sound
that bad...
One extra thing I was wondering is if if would make sense to rename the
signal (or trigger files) to .done once recovery is over. That's
useful for debugging. That could always be refined later..
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: michael@paquier.xyz, peter.eisentraut@2ndquadrant.com, sk@zsrv.org
Subject: Re: Continue work on changes to recovery.conf API
In-Reply-To: <20181122010951.GC3369@paquier.xyz>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox