From: Tom Lane <tgl@sss.pgh.pa.us>
To: jtv@xs4all.nl
Cc: pgsql-interfaces@postgresql.org
Subject: Re: Getting results after networking error
Date: Tue, 09 Aug 2005 23:07:53 -0400
Message-ID: <21820.1123643273@sss.pgh.pa.us> (raw)
In-Reply-To: <6201.202.47.227.25.1123640679.squirrel@202.47.227.25>
References: <4395.210.86.147.191.1123600604.squirrel@210.86.147.191>
<16904.1123604812@sss.pgh.pa.us>
<6201.202.47.227.25.1123640679.squirrel@202.47.227.25>
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
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, jtv@xs4all.nl
Subject: Re: Getting results after networking error
In-Reply-To: <21820.1123643273@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