Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, Ashesh Vashi <ashesh(dot)vashi(at)enterprisedb(dot)com>, Mark Llewellyn <mark_llewellyn(at)adp(dot)com>, pgsql-hackers(at)postgresql(dot)org, Sujeet Rajguru <sujeet(dot)rajguru(at)enterprisedb(dot)com>
Subject: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Date: 2010-11-27 16:10:27
Message-ID: 201011271610.oARGARs10224@momjian.us
Views: Raw Message | Whole Thread | Download mbox
Thread:
Lists: pgsql-bugs pgsql-hackers

Tom Lane wrote:
> Bruce Momjian <bruce(at)momjian(dot)us> writes:
> > Tom Lane wrote:
> >> PQping is supposed to be smarter about classifying errors
> >> than this.
>
> > I was not aware this was discussed last week because I am behind on
> > email. I was fixing a report from a month ago. I did explain how I was
> > doing the tests.
>
> Um, you did respond in that thread, several times even:
> http://archives.postgresql.org/pgsql-hackers/2010-11/msg01102.php
> so I kind of assumed that the patch you presented this week did
> what was agreed to last week.

Yes, I do remember that, but I remember this:

http://archives.postgresql.org/pgsql-hackers/2010-11/msg01095.php

What we want here is to check the result of postmaster.c's
canAcceptConnections(),

and this:

http://archives.postgresql.org/pgsql-hackers/2010-11/msg01106.php

You do have to distinguish connection failures (ie connection refused)
from errors that came back from the postmaster, and the easiest place to
be doing that is inside libpq.

which I thought meant it had to be done in libpq and we didn't have
access to the postmaster return codes in libpq.

Your changes look very good, and not something I would have been able to
code.

> I have committed a patch to make PQping do what was agreed to.

Thanks.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-11-27 16:56:19 Re: changing MyDatabaseId
Previous Message Manuel Sugawara 2010-11-27 15:33:53 Re: [HACKERS] Favorable i--)

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-11-27 16:23:46 Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme
Previous Message Magnus Hagander 2010-11-27 16:07:34 Re: BUG #5773: DEBUG: reaping dead processes DEBUG: server process (PID 10007) was terminated by signal 11: Segme