Re: Getting results after networking error - Mailing list pgsql-interfaces

From Tom Lane
Subject Re: Getting results after networking error
Date
Msg-id 21820.1123643273@sss.pgh.pa.us
Whole thread Raw
In response to Re: Getting results after networking error  (jtv@xs4all.nl)
Responses Re: Getting results after networking error
List pgsql-interfaces
jtv@xs4all.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


pgsql-interfaces by date:

Previous
From: jtv@xs4all.nl
Date:
Subject: Re: Getting results after networking error
Next
From: "Joshua D. Drake"
Date:
Subject: Re: pgperl vs dbd-perl