Andres Freund <andres@anarazel.de> writes:
> It's not in this change, but related. I don't really understand the
> /*
> * PQgetResult will return immediately in all states except BUSY, or if we
> * had a write failure.
> */
> return conn->asyncStatus == PGASYNC_BUSY || conn->write_failed;
> business in PQisBusy(). Won't that potentially lead to clients waiting for
> more network IO indefinitely, never getting around to calling PQgetResult()?
I was staring at that for awhile too. It's my own code (from 1f39a1c0641)
but it sure confuses me now; at the very least the code is not in sync
with the comment. However, it's been that way for a couple years now and
we've not had complaints suggesting it's broken, so maybe it's the comment
that's wrong.
regards, tom lane