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

Commitf1e57a4

Browse files
Cleanup VirtualXact at end of Hot Standby.
1 parent7a2fe9b commitf1e57a4

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
@@ -105,6 +105,9 @@ ShutdownRecoveryTransactionEnvironment(void)
105105

106106
/* Release all locks the tracked transactions were holding */
107107
StandbyReleaseAllLocks();
108+
109+
/* Cleanup our VirtualTransaction */
110+
VirtualXactLockTableCleanup();
108111
}
109112

110113

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

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

215214
/*
216215
* To make the fast-path lock mechanism work, we must have some way of
@@ -3791,7 +3790,7 @@ VirtualXactLockTableInsert(VirtualTransactionId vxid)
37913790
*Check whether a VXID lock has been materialized; if so, release it,
37923791
*unblocking waiters.
37933792
*/
3794-
staticvoid
3793+
void
37953794
VirtualXactLockTableCleanup()
37963795
{
37973796
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