Hello,
apologize for bumping the question to -hackers but I got no answer
from -general. If there is a better ML to post it let me know.
In a libpq application, if there is an application error between
PQsendQuery and PQgetResult, is there a way to revert a connection
back to an usable state (i.e. from transaction status ACTIVE to IDLE)
without using the network in a blocking way? We are currently doing
while (NULL != (res = PQgetResult(conn->pgconn))) { PQclear(res); }
but this is blocking, and if the error had been caused by the network
down, we'll just get stuck in a poll() waiting for a timeout.
Thank you very much.
-- Daniele