Re: We should Axe /contrib/start-scripts - Mailing list pgsql-hackers

From Tom Lane
Subject Re: We should Axe /contrib/start-scripts
Date
Msg-id 2374.1251233168@sss.pgh.pa.us
Whole thread Raw
In response to Re: We should Axe /contrib/start-scripts  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Alvaro Herrera <alvherre@commandprompt.com> wrote: 
>> That's within my definition of "ugly", yes :-)  My ideal tool would
>> do something like
>> 
>> $ pg_ping -h foo -p 5555
>> IN_RECOVERY
>> $ echo $?
>> 2
>> 
>> $ # sleep a bit ...
>> 
>> $ pg_ping -h foo -p 5555
>> READY
>> $ echo $?
>> 0
> Cool, but how would you do that without bypassing authentication?

The postmaster is already set up so that if it's not accepting
connections, it'll tell you so before getting to the authentication
stage.

If anyone were to go to the trouble of inventing pg_ping, I'd be a bit
inclined to add something to the postmaster protocol so that a ping
packet didn't have to look just like a phony login attempt.  But that's
just so that people who log connection attempts won't get all flustered.
The capability exists anyway.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Kevin Grittner"
Date:
Subject: Re: We should Axe /contrib/start-scripts
Next
From: Alvaro Herrera
Date:
Subject: Re: We should Axe /contrib/start-scripts