Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 179F81337BD3 for ; Mon, 24 Jan 2011 11:35:23 -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 48994-01-2 for ; Mon, 24 Jan 2011 15:35:15 +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 1AEBE133809B for ; Mon, 24 Jan 2011 11:29:42 -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 p0OFTgAC006495; Mon, 24 Jan 2011 10:29:42 -0500 (EST) To: "Murray S. Kucherawy" cc: Robert Haas , "pgsql-bugs@postgresql.org" Subject: Re: BUG #5837: PQstatus() fails to report lost connection In-reply-to: References: <201101140136.p0E1aTFb017852@wwwmaster.postgresql.org> <1950.1295754244@sss.pgh.pa.us> Comments: In-reply-to "Murray S. Kucherawy" message dated "Sun, 23 Jan 2011 21:59:42 -0800" Date: Mon, 24 Jan 2011 10:29:41 -0500 Message-ID: <6493.1295882981@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: 201101/167 X-Sequence-Number: 29189 "Murray S. Kucherawy" writes: > Given what you say here, this seems to be an exception for which there > is currently no detection mechanism short of looking for that one > specific error string indicating it was administrative action causing > the error. This is complete nonsense. If you followed the documented method for using PQgetResult -- ie, keep calling it till it returns NULL, rather than assuming there will be a specific number of results --- then PQstatus would show you the bad status afterwards. regards, tom lane