Re: pgsql password when FreeBSD boots -- what's usual?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Sean Chittenden <sean(at)chittenden(dot)org>
Cc: Joel Rees <joel(at)alpsgiken(dot)gr(dot)jp>, pgsql-general(at)postgresql(dot)org
Subject: Re: pgsql password when FreeBSD boots -- what's usual?
Date: 2003-04-03 20:44:08
Message-ID: 13021.1049402648@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Sean Chittenden <sean(at)chittenden(dot)org> writes:
>> If you do that then I don't see what the advantage is. I thought
>> you meant this as a way of avoiding PID collisions after a reboot.

> It's a shared piece of information that can be used to determine if
> the postmaster is up and returning valid results if, at the protocol
> level, there was support for having the postmaster return the time at
> which it was started.

That seems unnecessary. All you'd really need is a "pg_ping" utility
that tries to open a connection to the postmaster, but doesn't bother
to go through with the connection request. If the socket connection
can be established then the database is presumably up. This could be
written today with no protocol change needed. I recall some prior
discussion about making pg_ping, but no one's got round to writing it.

It wouldn't necessarily be a bad idea to extend the protocol so that
such a utility could send an explicit "ping" packet rather than just
abandoning the connection, and the postmaster could answer back with
some simple status information like how long it's been up, whether it's
currently accepting connections, etc. But I don't think that pg_ctl has
to have that. You'd have to be pretty circumspect about how much status
you reveal to an unauthenticated caller, anyway.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Sean Chittenden 2003-04-03 20:52:10 Re: pgsql password when FreeBSD boots -- what's usual?
Previous Message alex b. 2003-04-03 20:42:03 Re: Newbie: problem Connecting to Server