diff options
Diffstat (limited to 'src/include/replication')
| -rw-r--r-- | src/include/replication/syncrep.h | 4 | ||||
| -rw-r--r-- | src/include/replication/walsender.h | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/include/replication/syncrep.h b/src/include/replication/syncrep.h index 9171eb6176..188ec65745 100644 --- a/src/include/replication/syncrep.h +++ b/src/include/replication/syncrep.h @@ -26,7 +26,6 @@ #define SYNC_REP_NOT_WAITING 0 #define SYNC_REP_WAITING 1 #define SYNC_REP_WAIT_COMPLETE 2 -#define SYNC_REP_MUST_DISCONNECT 3 /* user-settable parameters for synchronous replication */ extern bool synchronous_replication; @@ -42,6 +41,9 @@ extern void SyncRepCleanupAtProcExit(int code, Datum arg); extern void SyncRepInitConfig(void); extern void SyncRepReleaseWaiters(void); +/* called by wal writer */ +extern void SyncRepUpdateSyncStandbysDefined(void); + /* called by various procs */ extern int SyncRepWakeQueue(bool all); extern const char *assign_synchronous_standby_names(const char *newval, bool doit, GucSource source); diff --git a/src/include/replication/walsender.h b/src/include/replication/walsender.h index 2e5b2096ea..150a71fddd 100644 --- a/src/include/replication/walsender.h +++ b/src/include/replication/walsender.h @@ -78,6 +78,13 @@ typedef struct */ XLogRecPtr lsn; + /* + * Are any sync standbys defined? Waiting backends can't reload the + * config file safely, so WAL writer updates this value as needed. + * Protected by SyncRepLock. + */ + bool sync_standbys_defined; + WalSnd walsnds[1]; /* VARIABLE LENGTH ARRAY */ } WalSndCtlData; |
