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+U5nMJnUXO6PivvBo9Y03EizcsjzctE7Y4K3bz924KLtrzZvA@mail.gmail.com
Whole thread Raw
In response to Re: Add shutdown_at_recovery_target option to recovery.conf  (Simon Riggs <simon@2ndQuadrant.com>)
Responses Re: Add shutdown_at_recovery_target option to recovery.conf  (Andres Freund <andres@2ndquadrant.com>)
Re: Add shutdown_at_recovery_target option to recovery.conf  (Petr Jelinek <petr@2ndquadrant.com>)
List pgsql-hackers
On 19 November 2014 13:13, Simon Riggs <simon@2ndquadrant.com> wrote:

> I've reworded docs a little.

Done

> 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.

Done

>
> 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.

I've also moved the check to see if we should throw FATAL because
aren't yet consistent to *before* we do any actionOnRecoveryTarget
stuff. It seems essential that we know that earlier rather than later.

Thoughts?

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

Attachment

pgsql-hackers by date:

Previous
From: Mike Blackwell
Date:
Subject: Re: proposal: plpgsql - Assert statement
Next
From: Andres Freund
Date:
Subject: Re: Add shutdown_at_recovery_target option to recovery.conf