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: 21820.1123643273@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

Responses

Browse pgsql-interfaces by date

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