Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CC5B11337C59 for ; Mon, 24 Jan 2011 11:34:35 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 31672-01-5 for ; Mon, 24 Jan 2011 15:34:30 +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 C5B981337F4E for ; Mon, 24 Jan 2011 11:23:11 -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 p0OFNAd2006380; Mon, 24 Jan 2011 10:23:10 -0500 (EST) To: Robert Haas cc: "Murray S. Kucherawy" , 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 Robert Haas message dated "Sun, 23 Jan 2011 23:26:49 -0500" Date: Mon, 24 Jan 2011 10:23:10 -0500 Message-ID: <6379.1295882590@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/166 X-Sequence-Number: 29188 Robert Haas writes: > On Sat, Jan 22, 2011 at 10:44 PM, Tom Lane wrote: >> What did you do exactly?  testlibpq.c just uses PQexec(), and AFAICS the >> connection status does end up BAD if the backend is terminated before a >> PQexec starts. > PFA. Yeah, that was my first cut at it too, but it's not terribly interesting because it doesn't tell you anything about what PQstatus says after the first failed PQexec. regards, tom lane