Re: [HACKERS] "pg_ctl promote" exit status

2013-07-01 Thread Peter Eisentraut
On 7/1/13 12:47 PM, Bruce Momjian wrote: >> Approximately none of these changes seem correct to me. For example, >> why is failing to open the PID file 6, or failing to start the server 7? > > Well, according to that URL, we have: > > 6 program is not configured > 7 progr

Re: [HACKERS] "pg_ctl promote" exit status

2013-07-01 Thread Bruce Momjian
On Mon, Jul 1, 2013 at 10:11:23AM -0400, Peter Eisentraut wrote: > On 6/28/13 10:50 PM, Bruce Momjian wrote: > > 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 t

Re: [HACKERS] "pg_ctl promote" exit status

2013-07-01 Thread Peter Eisentraut
On 6/28/13 10:50 PM, Bruce Momjian wrote: > 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",

Re: [HACKERS] "pg_ctl promote" exit status

2013-06-28 Thread Bruce Momjian
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

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-28 Thread Tom Lane
Kevin Grittner writes: > Heikki Linnakangas 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 com

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-28 Thread Peter Eisentraut
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 t

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-28 Thread Kevin Grittner
Heikki Linnakangas 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

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-28 Thread Heikki Linnakangas
On 26.01.2013 23:44, Aaron W. Swenson wrote: On Fri, Jan 25, 2013 at 01:54:06PM -0500, Peter Eisentraut wrote: On 1/12/13 3:30 PM, Aaron W. Swenson wrote: The Linux Standard Base Core Specification 3.1 says this should return '3'. [1] [1] http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-g

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-26 Thread Aaron W. Swenson
On Fri, Jan 25, 2013 at 01:54:06PM -0500, Peter Eisentraut wrote: > On 1/12/13 3:30 PM, Aaron W. Swenson wrote: > > The Linux Standard Base Core Specification 3.1 says this should return > > '3'. [1] > > > > [1] > > http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/ini

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-25 Thread Peter Eisentraut
On 1/12/13 3:30 PM, Aaron W. Swenson wrote: > The Linux Standard Base Core Specification 3.1 says this should return > '3'. [1] > > [1] > http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html The LSB spec doesn't say anything about a "promote" action. An

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-25 Thread Dhruv Ahuja
Don't think the attachment made it in the last mail. Attaching now. On 25 January 2013 18:33, Dhruv Ahuja wrote: > May I propose the attached patch. > > Points to note and possibly discuss: > (a) Only exit codes in do_* functions have been changed. > (b) The link to, and the version of, LSB spe

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-25 Thread Dhruv Ahuja
May I propose the attached patch. Points to note and possibly discuss: (a) Only exit codes in do_* functions have been changed. (b) The link to, and the version of, LSB specifications has been updated. (c) A significant change is the exit code of do_stop() on stopping a stopped server. Previous re

Re: [HACKERS] "pg_ctl promote" exit status

2013-01-12 Thread Aaron W. Swenson
On Tue, Oct 23, 2012 at 12:29:11PM -0400, Robert Haas wrote: > On Tue, Oct 23, 2012 at 6:39 AM, Dhruv Ahuja wrote: > > The "pg_ctl promote" command returns an exit code of 1 when the server > > is not in standby mode, and the same exit code of 1 when the server > > isn't started at all. The only d

Re: [HACKERS] "pg_ctl promote" exit status

2012-10-23 Thread Robert Haas
On Tue, Oct 23, 2012 at 6:39 AM, Dhruv Ahuja wrote: > The "pg_ctl promote" command returns an exit code of 1 when the server > is not in standby mode, and the same exit code of 1 when the server > isn't started at all. The only difference at the time being is the > string output at the time, which

[HACKERS] "pg_ctl promote" exit status

2012-10-23 Thread Dhruv Ahuja
Hello The "pg_ctl promote" command returns an exit code of 1 when the server is not in standby mode, and the same exit code of 1 when the server isn't started at all. The only difference at the time being is the string output at the time, which FYI are... pg_ctl: cannot promote server; server is