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

From Michael Paquier
Subject Re: Add shutdown_at_recovery_target option to recovery.conf
Date
Msg-id CAB7nPqSUHVtEVZtKA+QPeExKWK6JzEwGKbBBD3Qd4bruRKFuog@mail.gmail.com
Whole thread
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
Re: Add shutdown_at_recovery_target option to recovery.conf
List pgsql-hackers


On Thu, Dec 4, 2014 at 10:13 PM, Petr Jelinek <petr@2ndquadrant.com> wrote:
> On 02/12/14 18:59, Robert Haas wrote:
>>
>> On Fri, Nov 28, 2014 at 11:59 AM, Petr Jelinek <petr@2ndquadrant.com>
>> wrote:
>>>>>
>>>>> I'm a bit late to the party, but wouldn't
>>>>>
>>>>> recovery_target_action = ...
>>>>>
>>>>> have been a better name for this? It'd be in line with the other
>>>>> recovery_target_* parameters, and also a bit shorter than the imho
>>>>> somewhat ugly "action_at_recovery_target".
>>>>
>>>>
>>>> FWIW, I too think that "recovery_target_action" is a better name.
>>>
>>>
>>> I agree.
>>
>>
>> +1.
>>
>
> Here is patch which renames action_at_recovery_target to
> recovery_target_action everywhere.
Thanks, Looks good to me.

A couple of things that would be good to document as well in recovery-config.sgml:
- the fact that pause_at_recovery_target is deprecated.
- the fact that both parameters cannot be used at the same time.
Let's not surprise the users with behaviors they may expect or guess and document this stuff precisely..

This would make docs consistent with this block of code in xlog.c:
        if (recoveryPauseAtTargetSet && actionAtRecoveryTargetSet)
                ereport(ERROR,
                                (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
                                 errmsg("cannot set both \"%s\" and \"%s\" recovery parameters",
                                                "pause_at_recovery_target",
                                                "action_at_recovery_target"),
                                 errhint("The \"pause_at_recovery_target\" is deprecated.")));

Regards,
--
Michael

pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf
Next
From: Michael Paquier
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf