Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't read from socket when data is pending in conn.block
conn.block still reads data from the socket, but only after checking the result queue and waiting for readability first. Reading data from the socket (PQconsumeInput) takes much more time than just checking available results (PQisBusy). So doing it as a precaution to conn.block is a performance issue, now that we call block before each get_result in pg-1.3.x. The test was introduced in commit 09bdc16 . It is not particular specific to conn.block, so that we can check the error class on consume_input equaly. Fixes #442
- Loading branch information
Showing
2 changed files
with
4 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters