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

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-17 19:07:52
Message-ID: AANLkTikB7YUtrLzZpYW_1sogTncrTc5GOTDxh8hC_mjB@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Wed, Nov 17, 2010 at 19:57, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Magnus Hagander wrote:
>> On Wed, Nov 17, 2010 at 19:50, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>> > Magnus Hagander wrote:
>> >> 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?
>>
>> >From the perspective of the service control manager, it should say
>> running. That might break other scenarios though, but i'm not sure - I
>> think we can safely say the server is running when we try to log in
>> and get a password failure.
>
> That was another part of the discussion.  Right now we report any FATAL,
> so it might be a password problem, or something else, and it seems doing
> all FATALs is the best idea because it will catch any other cases like
> this.
>
> Is FATAL, in general, enough to conclude the server is running?

No - specifically, we will send FATAL when "the database system is
starting up", which is exactly the one we want to *avoid*.

I think we should only exclude the password case. I guess we could
also do all fatal *except* <list>, but that seems more fragile.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2010-11-17 19:21:44 Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running
Previous Message Bruce Momjian 2010-11-17 18:57:19 Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2010-11-17 19:11:52 Re: changing MyDatabaseId
Previous Message Andres Freund 2010-11-17 19:06:46 Re: git diff script is not portable