mirror of
https://github.com/postgres/postgres.git
synced 2025-09-03 15:22:11 +03:00
Move synchronous_standbys_defined updates from WAL writer to BG writer.
This is advantageous because the BG writer is alive until much later in the shutdown sequence than WAL writer; we want to make sure that it's possible to shut off synchronous replication during a smart shutdown, else it might not be possible to complete the shutdown at all. Per very reasonable gripes from Fujii Masao and Simon Riggs.
This commit is contained in:
@@ -557,9 +557,9 @@ SyncRepWakeQueue(bool all)
|
||||
}
|
||||
|
||||
/*
|
||||
* WAL writer calls this as needed to update the shared sync_standbys_defined
|
||||
* flag, so that backends don't remain permanently wedged if
|
||||
* synchronous_standby_names is unset. It's safe to check the current value
|
||||
* The background writer calls this as needed to update the shared
|
||||
* sync_standbys_defined flag, so that backends don't remain permanently wedged
|
||||
* if synchronous_standby_names is unset. It's safe to check the current value
|
||||
* without the lock, because it's only ever updated by one process. But we
|
||||
* must take the lock to change it.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user