]> granicus.if.org Git - postgresql/commit
Fix the logic in libpqrcv_receive() to determine if there's any incoming data
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 13 Jan 2011 15:51:28 +0000 (17:51 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 13 Jan 2011 16:00:37 +0000 (18:00 +0200)
commita08363d70cb51f361c9525384e9f46a252fcd92e
tree2c67c06551c47e313494019d5db65c197304d895
parentfed8dcdb84d255088d22efa3156a193f3399e792
Fix the logic in libpqrcv_receive() to determine if there's any incoming data
that can be read without blocking. It used to conclude that there isn't, even
though there was data in the socket receive buffer. That lead walreceiver to
flush the WAL after every received chunk, potentially causing big performance
issues.

Backpatch to 9.0, because the performance impact can be very significant.
src/backend/replication/libpqwalreceiver/libpqwalreceiver.c