]> granicus.if.org Git - postgresql/commit
Fix bug in clean shutdown of walsender that pg_receiving is connecting to.
authorFujii Masao <fujii@postgresql.org>
Mon, 17 Mar 2014 11:42:35 +0000 (20:42 +0900)
committerFujii Masao <fujii@postgresql.org>
Mon, 17 Mar 2014 11:42:35 +0000 (20:42 +0900)
commit65e8dbb1869db542c93333fc809f34c7d3f7d9bd
treec98d377eb0576e1fc3ac636e9fb55199fccc76a0
parentf84997c7e6687548d0d92631dceb125f89e55a2b
Fix bug in clean shutdown of walsender that pg_receiving is connecting to.

On clean shutdown, walsender waits for all WAL to be replicated to a standby,
and exits. It determined whether that replication had been completed by
checking whether its sent location had been equal to a standby's flush
location. Unfortunately this condition never becomes true when the standby
such as pg_receivexlog which always returns an invalid flush location is
connecting to walsender, and then walsender waits forever.

This commit changes walsender so that it just checks a standby's write
location if a flush location is invalid.

Back-patch to 9.1 where enough infrastructure for this exists.
src/backend/replication/walsender.c