Re: Add shutdown_at_recovery_target option to recovery.conf - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Add shutdown_at_recovery_target option to recovery.conf
Date
Msg-id CA+U5nMJ-tTOEV_8UtrBv4uKjmpfY6MtSQH58YSieZz3D4M3M-w@mail.gmail.com
Whole thread Raw
In response to Re: Add shutdown_at_recovery_target option to recovery.conf  (Petr Jelinek <petr@2ndquadrant.com>)
Responses Re: Add shutdown_at_recovery_target option to recovery.conf
List pgsql-hackers
On 11 September 2014 16:02, Petr Jelinek <petr@2ndquadrant.com> wrote:

>> What about adding something like action_at_recovery_target=pause|shutdown
>> instead of increasing the number of parameters?
>>
>
> That will also increase number of parameters as we can't remove the current
> pause one if we want to be backwards compatible. Also there would have to be
> something like action_at_recovery_target=none or off or something since the
> default is that pause is on and we need to be able to turn off pause without
> having to have shutdown on. What more, I am not sure I see any other actions
> that could be added in the future as promote action already works and listen
> (for RO queries) also already works independently of this.

I accept your argument, though I have other thoughts.

If someone specifies

shutdown_at_recovery_target = true
pause_at_recovery_target = true

it gets a little hard to work out what to do; we shouldn't allow such
lack of clarity.

In recovery its easy to do this

if (recoveryShutdownAtTarget)  recoveryPauseAtTarget = false;

but it won't be when these become GUCs, so I think Fuji's suggestion
is a good one.

No other comments on patch, other than good idea.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: 9.5: Better memory accounting, towards memory-bounded HashAgg
Next
From: Simon Riggs
Date:
Subject: Re: TODO : Allow parallel cores to be used by vacuumdb [ WIP ]