pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Dropped conection from libpq PGconn
2+ messages / 2 participants
[nested] [flat]

* Dropped conection from libpq PGconn
@ 2005-12-14 22:52 Kashyap Jani <kjani@cognitronics.com>
  2005-12-15 02:13 ` Re: Dropped conection from libpq PGconn Jeroen T. Vermeulen <jtv@xs4all.nl>
  0 siblings, 1 reply; 2+ messages in thread

From: Kashyap Jani @ 2005-12-14 22:52 UTC (permalink / raw)
  To: pgsql-interfaces

Hi All,
    I was wondering why does PGconn object keeps saying the connection 
is OK if I lost my Ethernet connection to the box where my database is 
running ?
If that's the case does any one know how to check if my connection 
objects are not valid anymore without using PGReset function call.

I will really appreciate any help any one can provide.



Regards,
Kashyap Jani




^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Dropped conection from libpq PGconn
  2005-12-14 22:52 Dropped conection from libpq PGconn Kashyap Jani <kjani@cognitronics.com>
@ 2005-12-15 02:13 ` Jeroen T. Vermeulen <jtv@xs4all.nl>
  0 siblings, 0 replies; 2+ messages in thread

From: Jeroen T. Vermeulen @ 2005-12-15 02:13 UTC (permalink / raw)
  To: Kashyap Jani <kjani@cognitronics.com>; +Cc: pgsql-interfaces

On Thu, December 15, 2005 05:52, Kashyap Jani wrote:

>     I was wondering why does PGconn object keeps saying the connection
> is OK if I lost my Ethernet connection to the box where my database is
> running ?
> If that's the case does any one know how to check if my connection
> objects are not valid anymore without using PGReset function call.

First of all, the change in status will probably only be noticed if you
actually try to use the connection and it fails.  This in turn may take a
very long time to time out if the physical connection is not there; you
may try looking for system-specific settings that can make your OS give up
on the connection more easily, but by nature it has to keep retrying for
as long as it can.

Finally, there used to be a bug in libpq where, even though PGresults
would come back with error codes when the connection broke with certain
errors (including connection timeout), it would fail to mark a connection
error in the PGconn.  This was fixed just a few months ago; the libpq in
8.1 should have the patch IIRC.

Here is some discussion on that:

http://svr5.postgresql.org/pgsql-interfaces/2005-07/msg00003.php


Jeroen





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-12-15 02:13 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-14 22:52 Dropped conection from libpq PGconn Kashyap Jani <kjani@cognitronics.com>
2005-12-15 02:13 ` Jeroen T. Vermeulen <jtv@xs4all.nl>

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