Re: Add shutdown_at_recovery_target option to recovery.conf

From: Petr Jelinek <petr(at)2ndquadrant(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Andres Freund <andres(at)2ndquadrant(dot)com>, 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 22:47:09
Message-ID: 546D1DED.7020507@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 19/11/14 19:51, Simon Riggs wrote:
> On 19 November 2014 16:11, Petr Jelinek <petr(at)2ndquadrant(dot)com> wrote:
>
>>> We need to be able to tell the difference between a crashed Startup
>>> process and this usage.
>>>
>>> As long as we can tell, I don't mind how we do it.
>>>
>>> Suggestions please.
>>>
>>
>> Different exit code?
>
> Try this one.
>

Ok this seems ok, I did couple of fixes - used exit code 3 as 2 is used
in some places - given the "if (pid == StartupPID)" it would probably
never conflict in practice, but better be safe than sorry in this case IMHO.
And you forgot to actually set the postmaster into one of the Shutdown
states so I added that.

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

Attachment Content-Type Size
shutdown_at_recovery_target-v6.patch text/x-diff 10.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2014-11-19 22:54:55 Re: proposal: plpgsql - Assert statement
Previous Message Marko Tiikkaja 2014-11-19 22:38:27 Re: proposal: plpgsql - Assert statement