mirror of
https://github.com/postgres/postgres.git
synced 2025-05-29 00:03:09 -04:00
Cleanup VirtualXact at end of Hot Standby
Resolves bug 7572 reported by Daniele Varrazzo
This commit is contained in:
parent
fdac4e2ba2
commit
edfc84b878
@ -103,6 +103,9 @@ ShutdownRecoveryTransactionEnvironment(void)
|
||||
|
||||
/* Release all locks the tracked transactions were holding */
|
||||
StandbyReleaseAllLocks();
|
||||
|
||||
/* Cleanup our VirtualTransaction */
|
||||
VirtualXactLockTableCleanup();
|
||||
}
|
||||
|
||||
|
||||
|
@ -209,7 +209,6 @@ static bool FastPathUnGrantRelationLock(Oid relid, LOCKMODE lockmode);
|
||||
static bool FastPathTransferRelationLocks(LockMethod lockMethodTable,
|
||||
const LOCKTAG *locktag, uint32 hashcode);
|
||||
static PROCLOCK *FastPathGetRelationLockEntry(LOCALLOCK *locallock);
|
||||
static void VirtualXactLockTableCleanup(void);
|
||||
|
||||
/*
|
||||
* To make the fast-path lock mechanism work, we must have some way of
|
||||
@ -3734,7 +3733,7 @@ VirtualXactLockTableInsert(VirtualTransactionId vxid)
|
||||
* Check whether a VXID lock has been materialized; if so, release it,
|
||||
* unblocking waiters.
|
||||
*/
|
||||
static void
|
||||
void
|
||||
VirtualXactLockTableCleanup()
|
||||
{
|
||||
bool fastpath;
|
||||
|
@ -544,6 +544,7 @@ extern void DumpAllLocks(void);
|
||||
|
||||
/* Lock a VXID (used to wait for a transaction to finish) */
|
||||
extern void VirtualXactLockTableInsert(VirtualTransactionId vxid);
|
||||
extern void VirtualXactLockTableCleanup(void);
|
||||
extern bool VirtualXactLock(VirtualTransactionId vxid, bool wait);
|
||||
|
||||
#endif /* LOCK_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user