Skip site navigation (1) Skip section navigation (2)

Re: libpq PQstatus problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: philip(dot)howell(at)cit(dot)act(dot)edu(dot)au
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: libpq PQstatus problem
Date: 2001-03-14 05:52:06
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
<philip(dot)howell(at)cit(dot)act(dot)edu(dot)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

In response to


pgsql-interfaces by date

Next:From: Oliver ElphickDate: 2001-03-14 06:27:08
Subject: Re: PG7.1b5 .debs (fwd)
Previous:From: philip.howellDate: 2001-03-14 05:43:09
Subject: Re[2]: libpq PQstatus problem

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group