Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit db21030

Browse files
committed
Treate globaltablespace relations as local in backend's snapshot
1 parent 12586dc commit db21030

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,7 @@ ReadBuffer_common(SMgrRelation smgr, char relpersistence, ForkNumber forkNum,
712712
bool isExtend;
713713
bool isLocalBuf;
714714

715-
if (sfs_backend_snapshot != SFS_INVALID_SNAPSHOT && smgr->smgr_rnode.node.spcNode != GLOBALTABLESPACE_OID)
715+
if (sfs_backend_snapshot != SFS_INVALID_SNAPSHOT)
716716
{
717717
/* Do not use shared buffers: treat all relations as local */
718718
isLocalBuf = true;

src/backend/storage/ipc/procarray.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -807,9 +807,12 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running)
807807
/*
808808
* Add the sorted snapshot into KnownAssignedXids
809809
*/
810-
for (i = 0; i < nxids; i++)
811-
KnownAssignedXidsAdd(xids[i], xids[i], true);
812-
810+
KnownAssignedXidsAdd(xids[0], xids[0], true);
811+
for (i = 1; i < nxids; i++)
812+
{
813+
if (xids[i] != xids[i-1])
814+
KnownAssignedXidsAdd(xids[i], xids[i], true);
815+
}
813816
KnownAssignedXidsDisplay(trace_recovery(DEBUG3));
814817
}
815818

0 commit comments

Comments
 (0)