diff options
Diffstat (limited to 'src/include/storage/proc.h')
-rw-r--r-- | src/include/storage/proc.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 78dbadef4cf..1d6642c6c7b 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -14,6 +14,9 @@ #ifndef _PROC_H_ #define _PROC_H_ +#include "access/xlog.h" +#include "replication/syncrep.h" +#include "storage/latch.h" #include "storage/lock.h" #include "storage/pg_sema.h" #include "utils/timestamp.h" @@ -116,6 +119,17 @@ struct PGPROC * lock object by this backend */ /* + * Info to allow us to wait for synchronous replication, if needed. + * waitLSN is InvalidXLogRecPtr if not waiting; set only by user backend. + * syncRepState must not be touched except by owning process or WALSender. + * syncRep_links used only while holding SyncRepLock. + */ + Latch waitLatch; /* allow us to wait for sync rep */ + XLogRecPtr waitLSN; /* waiting for this LSN or higher */ + int syncRepState; /* wait state for sync rep */ + SHM_QUEUE syncRepLinks; /* list link if process is in syncrep queue */ + + /* * All PROCLOCK objects for locks held or awaited by this backend are * linked into one of these lists, according to the partition number of * their lock. |