support any x group
This commit is contained in:
@ -39,11 +39,16 @@
|
||||
#define SYNC_REP_PRIORITY 0
|
||||
#define SYNC_REP_QUORUM 1
|
||||
|
||||
#define SYNC_REP_MAX_GROUPS 256
|
||||
|
||||
extern volatile bool most_available_sync;
|
||||
|
||||
#define SyncStandbysDefined() \
|
||||
(u_sess->attr.attr_storage.SyncRepStandbyNames != NULL && u_sess->attr.attr_storage.SyncRepStandbyNames[0] != '\0')
|
||||
|
||||
#define GetWalsndSyncRepConfig(walsnder) \
|
||||
(t_thrd.syncrep_cxt.SyncRepConfig[(walsnder)->sync_standby_group])
|
||||
|
||||
/*
|
||||
* Struct for the configuration of synchronous replication.
|
||||
*
|
||||
|
||||
@ -118,10 +118,11 @@ typedef struct WalSnd {
|
||||
Latch latch;
|
||||
|
||||
/*
|
||||
* The priority order of the standby managed by this WALSender, as listed
|
||||
* in synchronous_standby_names, or 0 if not-listed. Protected by
|
||||
* SyncRepLock.
|
||||
* The strategy group and priority order of the standby managed by this WALSender,
|
||||
* as listed in synchronous_standby_names, or 0 if not-listed.
|
||||
* Protected by SyncRepLock.
|
||||
*/
|
||||
uint8 sync_standby_group;
|
||||
int sync_standby_priority;
|
||||
int index;
|
||||
LogCtrlData log_ctrl;
|
||||
|
||||
Reference in New Issue
Block a user