Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-03-11 Thread Bruce Momjian
Robert Haas wrote: On Tue, Jan 25, 2011 at 10:54 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@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

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-03-11 Thread Robert Haas
On Fri, Mar 11, 2011 at 5:56 AM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Tue, Jan 25, 2011 at 10:54 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: I think this patch would only be adding to the confusion. ?When

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-03-11 Thread Bruce Momjian
Robert Haas wrote: On Fri, Mar 11, 2011 at 5:56 AM, Bruce Momjian br...@momjian.us wrote: Robert Haas wrote: On Tue, Jan 25, 2011 at 10:54 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@gmail.com wrote: I think this patch would only be adding to the

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-03-11 Thread Merlin Moncure
: [BUGS] BUG #5837: PQstatus() fails to report lost connection I think the real, underlying problem here is that Murray would like a behavior change: when a FATAL or PANIC condition is reported by the server, he'd like the client to immediately close the socket and set its status to CONNECTION_BAD

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-25 Thread Robert Haas
On Mon, Jan 24, 2011 at 1:47 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Murray S. Kucherawy m...@cloudmark.com wrote: From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] What do you think would make this more clear? So maybe something like this after the paragraph you cited

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-25 Thread Kevin Grittner
Robert Haas robertmh...@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

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-25 Thread Robert Haas
On Tue, Jan 25, 2011 at 10:54 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Robert Haas robertmh...@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.  

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-25 Thread Murray S. Kucherawy
-Original Message- From: Robert Haas [mailto:robertmh...@gmail.com] Sent: Tuesday, January 25, 2011 7:33 AM To: Kevin Grittner Cc: Murray S. Kucherawy; Tom Lane; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection I think the real

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Saturday, January 22, 2011 7:44 PM To: Robert Haas Cc: Murray S. Kucherawy; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection Robert Haas robertmh...@gmail.com

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Robert Haas [mailto:robertmh...@gmail.com] Sent: Sunday, January 23, 2011 8:59 PM To: Murray S. Kucherawy Cc: Tom Lane; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection As for the reply above, I disagree

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Robert Haas
On Mon, Jan 24, 2011 at 12:59 AM, Murray S. Kucherawy m...@cloudmark.com wrote: Well my other suggestion would be to assume PGRES_FATAL_ERROR always means the connection needs to be reset.  But this blows that idea away; this would cause a connection reset that wouldn't actually solve the

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Sat, Jan 22, 2011 at 10:44 PM, Tom Lane t...@sss.pgh.pa.us 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

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Tom Lane
Murray S. Kucherawy m...@cloudmark.com 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.

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Monday, January 24, 2011 7:30 AM To: Murray S. Kucherawy Cc: Robert Haas; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection Murray S. Kucherawy m...@cloudmark.com

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Kevin Grittner
Murray S. Kucherawy m...@cloudmark.com wrote: Please, at a minimum, add some documentation about it. Current documentation at: http://www.postgresql.org/docs/9.0/interactive/libpq-async.html says: | PQgetResult must be called repeatedly until it returns a null | pointer, indicating that

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Monday, January 24, 2011 9:42 AM To: Murray S. Kucherawy Cc: Robert Haas; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection This is complete nonsense. If you

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Monday, January 24, 2011 9:50 AM To: Murray S. Kucherawy; Tom Lane Cc: Robert Haas; pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection Murray S

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Kevin Grittner
Murray S. Kucherawy m...@cloudmark.com wrote: From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] What do you think would make this more clear? So maybe something like this after the paragraph you cited would help: Note that after returning a PGresult object, PQresultStatus()

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-24 Thread Murray S. Kucherawy
-Original Message- From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] Sent: Monday, January 24, 2011 10:47 AM To: Murray S. Kucherawy; Tom Lane Cc: Robert Haas; pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #5837: PQstatus() fails to report lost connection A patch based

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-23 Thread Robert Haas
On Sat, Jan 22, 2011 at 10:44 PM, Tom Lane t...@sss.pgh.pa.us 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. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com

Re: [BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-23 Thread Robert Haas
On Sun, Jan 23, 2011 at 10:59 PM, Murray S. Kucherawy m...@cloudmark.com wrote: As for the reply above, I disagree.  PQstatus(), as documented, doesn't say anything about certain conditions in which it won't report that the connection is dead, when it actually is, once the connection was

[BUGS] BUG #5837: PQstatus() fails to report lost connection

2011-01-13 Thread Murray S. Kucherawy
The following bug has been logged online: Bug reference: 5837 Logged by: Murray S. Kucherawy Email address: m...@cloudmark.com PostgreSQL version: 9.0.2 Operating system: FreeBSD Description:PQstatus() fails to report lost connection Details: I'm accessing libpq