Re: "pg_ctl promote" exit status

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Kevin Grittner <kgrittn(at)ymail(dot)com>
Cc: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "pg_ctl promote" exit status
Date: 2013-01-28 15:08:59
Message-ID: 15332.1359385739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Kevin Grittner <kgrittn(at)ymail(dot)com> writes:
> Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
>> Not sure if that LSB section is relevant anyway. It specifies the
>> exit codes for init scripts, but pg_ctl is not an init script.

> Except that when I went to the trouble of wrapping pg_ctl with an
> init script which was thoroughly LSB compliant (according to my
> reading) and offered it to the community, everyone said that rather
> than have such a complicated script it would be better to change
> pg_ctl to include that logic and exit with an LSB compliant exit
> code.

Right. The start and stop actions are commonly used in initscripts
so it'd be handy if the exit codes for those didn't need to be
remapped.

On the other hand, it's not at all clear to me that anyone would try
to put the promote action into an initscript, or that LSB would have
anything to say about the exit codes for such a nonstandard action
anyway.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Asif Naeem 2013-01-28 15:10:05 Re: pg_ctl idempotent option
Previous Message Peter Eisentraut 2013-01-28 14:46:32 Re: "pg_ctl promote" exit status