Re: Add shutdown_at_recovery_target option to recovery.conf

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Petr Jelinek <petr(at)2ndquadrant(dot)com>, Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf
Date: 2014-11-27 03:22:32
Message-ID: CAHGQGwGS92SOTNVJzWr99c_RLK=2-d6qbcknw2ESNWq___NH+Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 26, 2014 at 5:15 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> On 25 November 2014 at 14:06, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>> On Thu, Nov 20, 2014 at 5:35 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>> On 19 November 2014 16:41, Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>>>> On Wed, Nov 19, 2014 at 10:49 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>>>> On Wed, Nov 19, 2014 at 8:13 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>>>>>> If we ask for PAUSE and we're not in HotStandby it just ignores it,
>>>>>> which means it changes into PROMOTE. My feeling is that we should
>>>>>> change that into a SHUTDOWN, not a PROMOTE.
>>>>>
>>>>> To me, that seems like a definite improvement.
>>>>
>>>> But changing the default will force us to set
>>>> action_at_recovery_target to 'promote'
>>>> when we want to just recover the database to the specified point.
>>>
>>> If you explicitly request pause and then can't pause, ISTM the action
>>> we actually perform shouldn't be the exact opposite of what was
>>> requested.
>>>
>>> So if the user explicitly requests pause and we aren't in HS then they
>>> should get Shutdown, which is closest action.
>>>
>>> If the user doesn't request anything at all then we can default to
>>> Promote, just like we do now.
>>
>> Yes, this is what I was trying to suggest. +1 to do that.
>
> Implemented.
>
> Patch committed.

Isn't it better to add the sample setting of this parameter into
recovery.conf.sample?

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2014-11-27 03:27:15 Re: BUG #12071: Stat collector went crasy (50MB/s constant writes)
Previous Message Joe Conway 2014-11-27 03:20:12 Re: dblink_get_connections() result for no connections