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

Re: Getting results after networking error

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: jtv(at)xs4all(dot)nl
Cc: pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Getting results after networking error
Date: 2005-08-10 03:07:53
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
jtv(at)xs4all(dot)nl writes:
> Tom Lane wrote:
>> On the whole I think the odds of re-syncing successfully are pretty bad,
>> and you'd be best off to pull the plug and start a new connection if you
>> see any networking failure.

> I guess that makes sense.  But how do I know that the failure is a
> networking failure and not, say, an SQL-level failure?  In my program, I
> mean, without human intervention?

I think that a reasonable API for this "if PQstatus(conn) is
CONNECTION_BAD then you had a networking problem".  I am not at all sure
how well libpq honors that definition currently ... but feel free to
send patches ;-)

			regards, tom lane

In response to


pgsql-interfaces by date

Next:From: Joshua D. DrakeDate: 2005-08-10 03:28:13
Subject: Re: pgperl vs dbd-perl
Previous:From: jtvDate: 2005-08-10 02:24:39
Subject: Re: Getting results after networking error

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