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

From Petr Jelinek
Subject Re: Add shutdown_at_recovery_target option to recovery.conf
Date
Msg-id 546CC3D5.8090504@2ndquadrant.com
Whole thread Raw
In response to Re: Add shutdown_at_recovery_target option to recovery.conf  (Simon Riggs <simon@2ndQuadrant.com>)
List pgsql-hackers
On 19/11/14 16:47, Simon Riggs wrote:
> On 19 November 2014 13:13, Simon Riggs <simon@2ndquadrant.com> wrote:
>>
>> Also, for the Shutdown itself, why are we not using
>>     kill(PostmasterPid, SIGINT)?
>
> Done
>
> Other plan is to throw a FATAL message.
>
>> That gives a clean, fast shutdown rather than what looks like a crash.
>
> I've also changed the location of where we do
> RECOVERY_TARGET_ACTION_SHUTDOWN, so its in the same place as where we
> pause.
>

Another problem with how you did these two changes is that if you just 
pause when you send kill then during clean shutdown the recovery will be 
resumed and will finish renaming the recovery.conf to recovery.done, 
bumping timeline etc, and we don't want that since that prevents 
resuming recovery in the future.

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



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: proposal: plpgsql - Assert statement
Next
From: Tom Lane
Date:
Subject: Re: Functions used in index definitions shouldn't be changed