Remove wal_sender_delay GUC, because it's no longer useful.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 Aug 2011 22:50:28 +0000 (18:50 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 10 Aug 2011 22:50:28 +0000 (18:50 -0400)
commitcff75130b5f63e45423c2ed90d6f2e84c21ef840
tree012d8e0577e23da312591ad2bd67c40bc895ff60
parent79b2ee20c8a041a85dd230c4e787bef22edae57b
Remove wal_sender_delay GUC, because it's no longer useful.

The latch infrastructure is now capable of detecting all cases where the
walsender loop needs to wake up, so there is no reason to have an arbitrary
timeout.

Also, modify the walsender loop logic to follow the standard pattern of
ResetLatch, test for work to do, WaitLatch.  The previous coding was both
hard to follow and buggy: it would sometimes busy-loop despite having
nothing available to do, eg between receipt of a signal and the next time
it was caught up with new WAL, and it also had interesting choices like
deciding to update to WALSNDSTATE_STREAMING on the strength of information
known to be obsolete.
doc/src/sgml/config.sgml
src/backend/replication/walsender.c
src/backend/utils/misc/guc.c
src/backend/utils/misc/postgresql.conf.sample
src/include/replication/walsender.h