Switch to using libpq async API. (#488)
* Switch to using libpq async API. The easy to use API PQexec() and PQexecParams() are blocking, which means those functions could fail to detect when a Postgres connection has been lost, and now wait an indefinite amount of time. Switch to using the async API PQsendQuery() or PQsendQueryParams() with the PQgetResult() function, all with some lower-level socket API calls such as select(2) and PQconsumeInput() and PQisBusy(). Note that when the server is no longer busy computing the result, we should loop over all the available results... apparently. * Code cleanup, add another check for interrupts. * Remove extra check for interrupts.
parent
cc702401
Please register or sign in to comment