Re: "pg_ctl promote" exit status

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: "pg_ctl promote" exit status
Date: 2013-06-29 02:50:33
Message-ID: 20130629025033.GI13790@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Jan 28, 2013 at 09:46:32AM -0500, Peter Eisentraut wrote:
> On 1/26/13 4:44 PM, Aaron W. Swenson wrote:
> > You are right. Had I read a little further down, it seems that the
> > exit status should actually be 7.
>
> 7 is OK for "not running", but what should we use when the server is not
> in standby mode? Using the idempotent argument that we are discussing
> for the stop action, promoting a server that is not a standby should be
> a noop and exit successfully. Not sure if that is what we want, though.

I looked at all the LSB return codes listed here and mapped them to
pg_ctl error situations:

https://refspecs.linuxbase.org/LSB_3.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html

Patch attached. I did not touch the start/stop return codes.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

Attachment Content-Type Size
pg_ctl.diff text/x-diff 8.8 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2013-06-29 03:03:22 Re: Re: [HACKERS] Patch für MAP_HUGETLB for mmap() shared memory
Previous Message Jeff Davis 2013-06-29 02:48:26 Re: pg_filedump 9.3: checksums (and a few other fixes)