From: Andrew Dunstan <andrew@dunslane.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Ashesh Vashi <ashesh.vashi@enterprisedb.com>
Cc: Mark Llewellyn <mark_llewellyn@adp.com>
Cc: pgsql-hackers@postgresql.org
Cc: Sujeet Rajguru <sujeet.rajguru@enterprisedb.com>
Subject: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Date: Fri, 24 Sep 2010 16:30:52 -0400
Message-ID: <4C9D0A7C.80400@dunslane.net> (raw)
In-Reply-To: <25617.1285341066@sss.pgh.pa.us>
References: <201009091622.o89GMp0V012822@wwwmaster.postgresql.org>
<AANLkTinGKCkc1maDGXyMjcWRoKAXx2KhMDdQazT-jsgB@mail.gmail.com>
<AANLkTinqm4cY_e6C5cYh9Uf7gzX_-Vy475Z3ZO6_PKkr@mail.gmail.com>
<13967.1285337095@sss.pgh.pa.us>
<AANLkTimFTNqkPUsUhfWqHtThpu6iJ6OYH1etFYXa1tM8@mail.gmail.com>
<4C9CB8E8.3040106@dunslane.net>
<25617.1285341066@sss.pgh.pa.us>
On 09/24/2010 11:11 AM, Tom Lane wrote:
> Andrew Dunstan<andrew@dunslane.net> writes:
>> On 09/24/2010 10:15 AM, Magnus Hagander wrote:
>>> In that case, we should probably teach pg_ctl about this case, no?
>>> Since it clearly gives an incorrect message to the user now...
>> pg_ctl decides that the server is running iff it can connect to it. Do
>> you intend to provide for a different test?
> Seems like getting a password challenge from the server is sufficient
> evidence that the server is running, whether we are able to meet the
> challenge or not. Perhaps we could just twiddle pg_ctl's "is it up"
> test a bit to notice whether the connect failure was of this sort.
pg_ctl does in fact use that sort of logic:
if ((conn = PQconnectdb(connstr)) != NULL &&
(PQstatus(conn) == CONNECTION_OK ||
PQconnectionNeedsPassword(conn)))
But of course, libpq won't set that last condition if there is a bad
password in the pgpass file, which seems a rather perverse thing to do.
cheers
andrew
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: andrew@dunslane.net, tgl@sss.pgh.pa.us, magnus@hagander.net, ashesh.vashi@enterprisedb.com, mark_llewellyn@adp.com, pgsql-hackers@postgresql.org, sujeet.rajguru@enterprisedb.com
Subject: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
In-Reply-To: <4C9D0A7C.80400@dunslane.net>
References: <201009091622.o89GMp0V012822@wwwmaster.postgresql.org> <AANLkTinGKCkc1maDGXyMjcWRoKAXx2KhMDdQazT-jsgB@mail.gmail.com> <AANLkTinqm4cY_e6C5cYh9Uf7gzX_-Vy475Z3ZO6_PKkr@mail.gmail.com> <13967.1285337095@sss.pgh.pa.us> <AANLkTimFTNqkPUsUhfWqHtThpu6iJ6OYH1etFYXa1tM8@mail.gmail.com> <4C9CB8E8.3040106@dunslane.net> <25617.1285341066@sss.pgh.pa.us> <4C9D0A7C.80400@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox