]> 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:26:39 +0000 (18:26 +0200)
commita5a02a744555789ab8390dbf57271e9d07127602
treec96828139248a54dde6de4d446071b1d3d40f783
parentc667cc24e888dc4efe4c2412ad8dd13a190295e3
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