Re: Continue work on changes to recovery.conf API

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
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 11:58:19
Message-ID: 617a69c1-1a6c-4423-26e2-616877d842cf@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 21/11/2018 07:00, Michael Paquier wrote:
> 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.

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.

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.

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Banck 2018-11-21 12:35:35 Re: Online verification of checksums
Previous Message Amit Langote 2018-11-21 10:23:52 Re: speeding up planning with partitions