Re: pg_ctl status with nonexistent data directory - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: pg_ctl status with nonexistent data directory
Date
Msg-id 20140307142930.GA21154@momjian.us
Whole thread Raw
In response to Re: pg_ctl status with nonexistent data directory  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pg_ctl status with nonexistent data directory
List pgsql-hackers
On Fri, Mar  7, 2014 at 07:18:04PM +0530, Amit Kapila wrote:
> > OK, done with the attached patch  Three is returned for status, but one
> > for other cases.
>
> I think it would have been better if it return status as 4 for cases where
> directory/file is not accessible (current new cases added by this patch).
>
> I think status 3 should be only return only when the data directory is valid
> and pid file is missing, because in script after getting this code, the next
> thing they will probably do is to start the server which doesn't seem a
> good fit for newly added cases.

OK, I have updated the attached patch to reflect this, and added a C
comment.

--
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + Everyone has their own god. +

Attachment

pgsql-hackers by date:

Previous
From: Florian Weimer
Date:
Subject: Re: atexit_callback can be a net negative
Next
From: Heikki Linnakangas
Date:
Subject: Re: atexit_callback can be a net negative