#include "miscadmin.h"
#include "pgstat.h"
#include "postmaster/bgwriter.h"
+#include "replication/syncrep.h"
#include "storage/bufmgr.h"
#include "storage/fd.h"
#include "storage/ipc.h"
if (RecoveryInProgress())
ThisTimeLineID = GetRecoveryTargetTLI();
+ /* Do this once before starting the loop, then just at SIGHUP time. */
+ SyncRepUpdateSyncStandbysDefined();
+
/*
* Loop forever
*/
{
got_SIGHUP = false;
ProcessConfigFile(PGC_SIGHUP);
+ /* update global shmem state for sync rep */
+ SyncRepUpdateSyncStandbysDefined();
}
if (checkpoint_requested)
{
{
got_SIGHUP = false;
ProcessConfigFile(PGC_SIGHUP);
+ /* update global shmem state for sync rep */
+ SyncRepUpdateSyncStandbysDefined();
}
AbsorbFsyncRequests();
#include "libpq/pqsignal.h"
#include "miscadmin.h"
#include "postmaster/walwriter.h"
-#include "replication/syncrep.h"
#include "storage/bufmgr.h"
#include "storage/fd.h"
#include "storage/ipc.h"
*/
PG_SETMASK(&UnBlockSig);
- /* Do this once before starting the loop, then just at SIGHUP time. */
- SyncRepUpdateSyncStandbysDefined();
-
/*
* Loop forever
*/
{
got_SIGHUP = false;
ProcessConfigFile(PGC_SIGHUP);
- /* update global shmem state for sync rep */
- SyncRepUpdateSyncStandbysDefined();
}
if (shutdown_requested)
{
}
/*
- * 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.
*/