Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 084BE1337B61 for ; Wed, 17 Nov 2010 15:55:45 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 21433-05 for ; Wed, 17 Nov 2010 19:55:37 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id B72991337B53 for ; Wed, 17 Nov 2010 15:55:37 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id oAHJtX2Z019439; Wed, 17 Nov 2010 14:55:33 -0500 (EST) To: Bruce Momjian cc: Magnus Hagander , Ashesh Vashi , Mark Llewellyn , pgsql-hackers@postgresql.org, Sujeet Rajguru Subject: Re: Re: [BUGS] BUG #5650: Postgres service showing as stopped when in fact it is running In-reply-to: <201011171947.oAHJlmh10273@momjian.us> References: <201011171947.oAHJlmh10273@momjian.us> Comments: In-reply-to Bruce Momjian message dated "Wed, 17 Nov 2010 14:47:48 -0500" Date: Wed, 17 Nov 2010 14:55:33 -0500 Message-ID: <19438.1290023733@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201011/1107 X-Sequence-Number: 174250 Bruce Momjian writes: > Agreed. So how do we pass that info to libpq without exceeding the > value of fixing this problem? Should we parse pg_controldata output? > pg_upgrade could use machine-readable output from that too. pg_controldata seems 100% unrelated to this problem. You cannot even tell if the postmaster is alive just by inspecting pg_control. >> What we actually want here, and don't have, is the fabled pg_ping >> protocol... > Well, we are basically figuring how to implement that with this fix, > whether it is part of pg_ctl or a separate binary. Possibly the cleanest fix is to implement pg_ping as a libpq function. 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. regards, tom lane