diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/storage/lmgr.h | 5 | ||||
| -rw-r--r-- | src/include/storage/lock.h | 4 | ||||
| -rw-r--r-- | src/include/storage/proc.h | 2 | ||||
| -rw-r--r-- | src/include/storage/sinvaladt.h | 3 |
4 files changed, 8 insertions, 6 deletions
diff --git a/src/include/storage/lmgr.h b/src/include/storage/lmgr.h index bd44d92be3..340f6a3d30 100644 --- a/src/include/storage/lmgr.h +++ b/src/include/storage/lmgr.h @@ -56,11 +56,6 @@ extern void XactLockTableDelete(TransactionId xid); extern void XactLockTableWait(TransactionId xid); extern bool ConditionalXactLockTableWait(TransactionId xid); -/* Lock a VXID (used to wait for a transaction to finish) */ -extern void VirtualXactLockTableInsert(VirtualTransactionId vxid); -extern void VirtualXactLockTableWait(VirtualTransactionId vxid); -extern bool ConditionalVirtualXactLockTableWait(VirtualTransactionId vxid); - /* Lock a general object (other than a relation) of the current database */ extern void LockDatabaseObject(Oid classid, Oid objid, uint16 objsubid, LOCKMODE lockmode); diff --git a/src/include/storage/lock.h b/src/include/storage/lock.h index 21b77f3059..e106ad5401 100644 --- a/src/include/storage/lock.h +++ b/src/include/storage/lock.h @@ -543,4 +543,8 @@ extern void DumpLocks(PGPROC *proc); extern void DumpAllLocks(void); #endif +/* Lock a VXID (used to wait for a transaction to finish) */ +extern void VirtualXactLockTableInsert(VirtualTransactionId vxid); +extern bool VirtualXactLock(VirtualTransactionId vxid, bool wait); + #endif /* LOCK_H */ diff --git a/src/include/storage/proc.h b/src/include/storage/proc.h index 92b3b19f2d..a149a55855 100644 --- a/src/include/storage/proc.h +++ b/src/include/storage/proc.h @@ -152,6 +152,8 @@ struct PGPROC /* Lock manager data, recording fast-path locks taken by this backend. */ uint64 fpLockBits; /* lock modes held for each fast-path slot */ Oid fpRelId[FP_LOCK_SLOTS_PER_BACKEND]; /* slots for rel oids */ + bool fpVXIDLock; /* are we holding a fast-path VXID lock? */ + LocalTransactionId fpLocalTransactionId; /* lxid for fast-path VXID lock */ }; /* NOTE: "typedef struct PGPROC PGPROC" appears in storage/lock.h. */ diff --git a/src/include/storage/sinvaladt.h b/src/include/storage/sinvaladt.h index c70355847a..a61d696508 100644 --- a/src/include/storage/sinvaladt.h +++ b/src/include/storage/sinvaladt.h @@ -22,6 +22,7 @@ #ifndef SINVALADT_H #define SINVALADT_H +#include "storage/proc.h" #include "storage/sinval.h" /* @@ -30,7 +31,7 @@ extern Size SInvalShmemSize(void); extern void CreateSharedInvalidationState(void); extern void SharedInvalBackendInit(bool sendOnly); -extern bool BackendIdIsActive(int backendID); +extern PGPROC *BackendIdGetProc(int backendID); extern void SIInsertDataEntries(const SharedInvalidationMessage *data, int n); extern int SIGetDataEntries(SharedInvalidationMessage *data, int datasize); |
