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-22 01:09:51
Message-ID: 20181122010951.GC3369@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2018-11-22 01:12:19 Re: Online verification of checksums
Previous Message Michael Paquier 2018-11-22 00:51:09 Re: ToDo: show size of partitioned table