From: Tom Lane <tgl@sss.pgh.pa.us>
To: philip.howell@cit.act.edu.au
Cc: pgsql-interfaces@postgresql.org
Subject: Re: libpq PQstatus problem
Date: Wed, 14 Mar 2001 00:52:06 -0500
Message-ID: <23882.984549126@sss.pgh.pa.us> (raw)
In-Reply-To: <0103149845.AA984548336@mh-cit.cit.act.edu.au>
References: <0103149845.AA984548336@mh-cit.cit.act.edu.au>
<philip.howell@cit.act.edu.au> writes:
> Then I stopped the network (eth0) on the postgreSQL server and hit <return>
> again and still got
>> Connection status... OK
I don't believe this is a bug. PQstatus indicates whether you did make
a successful connection to the database server --- it is not intended to
be an up-to-the-nanosecond report on whether the network is still up or
not. In particular, the status will *not* be updated if you haven't
executed any new operations on the connection lately.
If you have a network that's so unstable that you need to program around
problems like this, consider 'ping'.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: tgl@sss.pgh.pa.us, philip.howell@cit.act.edu.au
Subject: Re: libpq PQstatus problem
In-Reply-To: <23882.984549126@sss.pgh.pa.us>
* 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