pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Murray S. Kucherawy <msk@cloudmark.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: BUG #5837: PQstatus() fails to report lost connection
Date: Tue, 25 Jan 2011 09:54:05 -0600
Message-ID: <4D3E9DBD0200002500039C36@gw.wicourts.gov> (raw)
In-Reply-To: <AANLkTi=vbzmBP9MyDvXcOOTRuzPMPYY5cEVfO+haDkrN@mail.gmail.com>
References: <201101140136.p0E1aTFb017852@wwwmaster.postgresql.org>
	<AANLkTinZAdPCX685ecg2_eVXJ1vDNXL4Ki-B1rFN=Z3h@mail.gmail.com>
	<1950.1295754244@sss.pgh.pa.us>
	<F5833273385BB34F99288B3648C4F06F1341E73FC4@EXCH-C2.corp.cloudmark.com>
	<AANLkTi=rSATsN+3UD5feWm3ntsB=6jqAFBZWdTZ7ZfaO@mail.gmail.com>
	<F5833273385BB34F99288B3648C4F06F1341E73FC6@EXCH-C2.corp.cloudmark.com>
	<6493.1295882981@sss.pgh.pa.us>
	<F5833273385BB34F99288B3648C4F06F1341E73FCB@EXCH-C2.corp.cloudmark.com>
	<4D3D67600200002500039B2C@gw.wicourts.gov>
	<F5833273385BB34F99288B3648C4F06F1341E73FCD@EXCH-C2.corp.cloudmark.com>
	<4D3D74D60200002500039B3C@gw.wicourts.gov>
	<AANLkTi=vbzmBP9MyDvXcOOTRuzPMPYY5cEVfO+haDkrN@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> wrote:
 
> I think this patch would only be adding to the confusion.  When
> PQgetResult() is called, we read enough data from the connection
> to create and return one result object.  It's true that this
> doesn't necessarily detect an EOF, but IIUC calling PQgetResult()
> again is just ONE way that you could trigger another read against
> the socket, not the only one.  I think it would also work to call
> PQconsumeInput(), for example.
 
I find it hard to reconcile the above with this:
 
http://archives.postgresql.org/message-id/6493.1295882981@sss.pgh.pa.us
 
and the quote from our documentation referenced here:
 
http://archives.postgresql.org/message-id/4D3D67600200002500039B2C@gw.wicourts.gov
 
> I think the real, underlying problem here is that Murray would
> like a behavior change
 
More than that I think he wants to be able to read the manual and
know what will work, without spending loads of time getting in tune
with The Tao of Libpq.  Based on his initial reading of the docs he
expected different behavior; that can be fixed by changing the
behavior or changing the docs.
 
-Kevin



view thread (25+ messages)  latest in thread

Message-ID: <4D3E9DBD0200002500039C36@gw.wicourts.gov>
Permalink:  ../4D3E9DBD0200002500039C36@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D3E9DBD0200002500039C36@gw.wicourts.gov

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, robertmhaas@gmail.com, msk@cloudmark.com, tgl@sss.pgh.pa.us
  Subject: Re: BUG #5837: PQstatus() fails to report lost connection
  In-Reply-To: <4D3E9DBD0200002500039C36@gw.wicourts.gov>
  References: <201101140136.p0E1aTFb017852@wwwmaster.postgresql.org> <AANLkTinZAdPCX685ecg2_eVXJ1vDNXL4Ki-B1rFN=Z3h@mail.gmail.com> <1950.1295754244@sss.pgh.pa.us> <F5833273385BB34F99288B3648C4F06F1341E73FC4@EXCH-C2.corp.cloudmark.com> <AANLkTi=rSATsN+3UD5feWm3ntsB=6jqAFBZWdTZ7ZfaO@mail.gmail.com> <F5833273385BB34F99288B3648C4F06F1341E73FC6@EXCH-C2.corp.cloudmark.com> <6493.1295882981@sss.pgh.pa.us> <F5833273385BB34F99288B3648C4F06F1341E73FCB@EXCH-C2.corp.cloudmark.com> <4D3D67600200002500039B2C@gw.wicourts.gov> <F5833273385BB34F99288B3648C4F06F1341E73FCD@EXCH-C2.corp.cloudmark.com> <4D3D74D60200002500039B3C@gw.wicourts.gov> <AANLkTi=vbzmBP9MyDvXcOOTRuzPMPYY5cEVfO+haDkrN@mail.gmail.com> <4D3E9DBD0200002500039C36@gw.wicourts.gov>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox