Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitedfc84b

Browse files
Cleanup VirtualXact at end of Hot Standby
Resolves bug 7572 reported by Daniele Varrazzo
1 parentfdac4e2 commitedfc84b

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

‎src/backend/storage/ipc/standby.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ ShutdownRecoveryTransactionEnvironment(void)
103103

104104
/* Release all locks the tracked transactions were holding */
105105
StandbyReleaseAllLocks();
106+
107+
/* Cleanup our VirtualTransaction */
108+
VirtualXactLockTableCleanup();
106109
}
107110

108111

‎src/backend/storage/lmgr/lock.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ static bool FastPathUnGrantRelationLock(Oid relid, LOCKMODE lockmode);
209209
staticboolFastPathTransferRelationLocks(LockMethodlockMethodTable,
210210
constLOCKTAG*locktag,uint32hashcode);
211211
staticPROCLOCK*FastPathGetRelationLockEntry(LOCALLOCK*locallock);
212-
staticvoidVirtualXactLockTableCleanup(void);
213212

214213
/*
215214
* To make the fast-path lock mechanism work, we must have some way of
@@ -3734,7 +3733,7 @@ VirtualXactLockTableInsert(VirtualTransactionId vxid)
37343733
*Check whether a VXID lock has been materialized; if so, release it,
37353734
*unblocking waiters.
37363735
*/
3737-
staticvoid
3736+
void
37383737
VirtualXactLockTableCleanup()
37393738
{
37403739
boolfastpath;

‎src/include/storage/lock.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ extern void DumpAllLocks(void);
544544

545545
/* Lock a VXID (used to wait for a transaction to finish) */
546546
externvoidVirtualXactLockTableInsert(VirtualTransactionIdvxid);
547+
externvoidVirtualXactLockTableCleanup(void);
547548
externboolVirtualXactLock(VirtualTransactionIdvxid,boolwait);
548549

549550
#endif/* LOCK_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp