Re: Add shutdown_at_recovery_target option to recovery.conf

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Petr Jelinek <petr(at)2ndquadrant(dot)com>
Cc: Asif Naeem <anaeem(dot)it(at)gmail(dot)com>, Fujii Masao <masao(dot)fujii(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-19 15:47:05
Message-ID: CA+U5nMJnUXO6PivvBo9Y03EizcsjzctE7Y4K3bz924KLtrzZvA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19 November 2014 13:13, Simon Riggs <simon(at)2ndquadrant(dot)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 Content-Type Size
shutdown_at_recovery_target-v4.patch application/octet-stream 9.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2014-11-19 15:57:27 Re: Add shutdown_at_recovery_target option to recovery.conf
Previous Message Mike Blackwell 2014-11-19 15:42:53 Re: proposal: plpgsql - Assert statement