Replace walsender's latch with the general shared latch.
authorAndres Freund <andres@anarazel.de>
Sat, 17 Jan 2015 12:00:42 +0000 (13:00 +0100)
committerAndres Freund <andres@anarazel.de>
Sat, 17 Jan 2015 12:00:42 +0000 (13:00 +0100)
commitff44fba46c09c37dd9e60da1cb0b3a9339eb085f
treec7200c94c36c93da2284087d1d645618994e1935
parent20af53d7191f84d0f5b86da4362e481b7e85d52a
Replace walsender's latch with the general shared latch.

Relying on the normal shared latch simplifies interrupt/signal
handling because we can rely on all signal handlers setting the proc
latch. That in turn allows us to avoid the use of
ImmediateInterruptOK, which arguably isn't correct because
WaitLatchOrSocket isn't declared to be immediately interruptible.

Also change sections that wait on the walsender's latch to notice
interrupts quicker/more reliably and make them more consistent with
each other.

This is part of a larger "get rid of ImmediateInterruptOK" series.

Discussion: 20150115020335.GZ5245@awork2.anarazel.de
src/backend/replication/basebackup.c
src/backend/replication/walsender.c
src/include/replication/walsender_private.h