mirror of
https://github.com/postgres/postgres.git
synced 2025-09-02 04:21:28 +03:00
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
This commit is contained in:
@@ -51,10 +51,10 @@ typedef struct WalSnd
|
||||
slock_t mutex;
|
||||
|
||||
/*
|
||||
* Latch used by backends to wake up this walsender when it has work to
|
||||
* do.
|
||||
* Pointer to the walsender's latch. Used by backends to wake up this
|
||||
* walsender when it has work to do. NULL if the walsender isn't active.
|
||||
*/
|
||||
Latch latch;
|
||||
Latch *latch;
|
||||
|
||||
/*
|
||||
* The priority order of the standby managed by this WALSender, as listed
|
||||
|
Reference in New Issue
Block a user