From: Bruce Momjian <bruce@momjian.us>
To: Magnus Hagander <magnus@hagander.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
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: Wed, 17 Nov 2010 13:50:22 -0500 (EST)
Message-ID: <201011171850.oAHIoM018166@momjian.us> (raw)
In-Reply-To: <AANLkTi=oUxVMeNs57movi0SPwzAWzDHA8XVQx9C3FitU@mail.gmail.com>
Magnus Hagander wrote:
> > I basically report the connection error string if it starts with "FATAL:".
> >
> > I originally tried to check for an ERRCODE_INVALID_PASSWORD error field
> > (see // comments), but it seems there is no way to access this, i.e.
> > PQgetResult(conn) on a connection failure is always NULL.
> >
> > Anyway, perhaps FATAL is a better test because it will report any major
> > failure, not just a .pgpass one.
> >
> > Patch attached.
>
> Bad Bruce, using C++ comments like that :P And non-context diff ;)
That comment use was to highlight that those are not for commit, but
there if people want to test.
As far as the diff, it seems git-external-diff isn't portable to
non-Linux systems; I will post a separate email on that.
> Does this actually solve the *problem*, though? The problem is not
> what is reported on stdout/stderr, the problem is that the net result
> is that the server is reported as not started (by the service control
> manager) when it actually *is* started. In this case, stderr doesn't
> even go anywhere. What happens if you *don't* Ctrl-C it?
I was just going to post on that. :-) Right now, it prints the FATAL
and keeps printing 60 times, then says not running. Should we just exit
on FATAL and output a special exit string, or say running?
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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: bruce@momjian.us, magnus@hagander.net, tgl@sss.pgh.pa.us, 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: <201011171850.oAHIoM018166@momjian.us>
References: <AANLkTi=oUxVMeNs57movi0SPwzAWzDHA8XVQx9C3FitU@mail.gmail.com> <201011171850.oAHIoM018166@momjian.us>
* 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