mirror of https://github.com/citusdata/citus.git
Fix pg18 snapshot registered crash
parent
50f9d893d3
commit
4816d520b6
|
|
@ -1510,6 +1510,8 @@ ReadDataFileStripeList(uint64 storageId, Snapshot snapshot)
|
||||||
|
|
||||||
Oid indexId = ColumnarStripeFirstRowNumberIndexRelationId();
|
Oid indexId = ColumnarStripeFirstRowNumberIndexRelationId();
|
||||||
bool indexOk = OidIsValid(indexId);
|
bool indexOk = OidIsValid(indexId);
|
||||||
|
|
||||||
|
snapshot = RegisterSnapshot(snapshot);
|
||||||
SysScanDesc scanDescriptor = systable_beginscan(columnarStripes, indexId,
|
SysScanDesc scanDescriptor = systable_beginscan(columnarStripes, indexId,
|
||||||
indexOk, snapshot, 1, scanKey);
|
indexOk, snapshot, 1, scanKey);
|
||||||
|
|
||||||
|
|
@ -1529,6 +1531,7 @@ ReadDataFileStripeList(uint64 storageId, Snapshot snapshot)
|
||||||
|
|
||||||
systable_endscan(scanDescriptor);
|
systable_endscan(scanDescriptor);
|
||||||
table_close(columnarStripes, AccessShareLock);
|
table_close(columnarStripes, AccessShareLock);
|
||||||
|
UnregisterSnapshot(snapshot);
|
||||||
|
|
||||||
return stripeMetadataList;
|
return stripeMetadataList;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue