jtv@xxxxxxxxx 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
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
message can get through to the mailing list cleanly
|