Fix HaveRegisteredOrActiveSnapshot() crashes

part of ce7ddc0d3d
pull/8222/head
naisila 2025-09-18 16:08:57 +03:00 committed by Naisila Puka
parent cdec663c60
commit 31e19e8b19
3 changed files with 6 additions and 0 deletions

View File

@ -657,7 +657,9 @@ SaveStripeSkipList(RelFileLocator relfilelocator, uint64 stripe,
nulls[Anum_columnar_chunk_maximum_value - 1] = true;
}
PushActiveSnapshot(GetTransactionSnapshot());
InsertTupleAndEnforceConstraints(modifyState, values, nulls);
PopActiveSnapshot();
}
}

View File

@ -2859,7 +2859,9 @@ InsertNodeRow(int nodeid, char *nodeName, int32 nodePort, NodeMetadata *nodeMeta
TupleDesc tupleDescriptor = RelationGetDescr(pgDistNode);
HeapTuple heapTuple = heap_form_tuple(tupleDescriptor, values, isNulls);
PushActiveSnapshot(GetTransactionSnapshot());
CatalogTupleInsert(pgDistNode, heapTuple);
PopActiveSnapshot();
CitusInvalidateRelcacheByRelid(DistNodeRelationId());

View File

@ -102,7 +102,9 @@ LogTransactionRecord(int32 groupId, char *transactionName)
TupleDesc tupleDescriptor = RelationGetDescr(pgDistTransaction);
HeapTuple heapTuple = heap_form_tuple(tupleDescriptor, values, isNulls);
PushActiveSnapshot(GetTransactionSnapshot());
CatalogTupleInsert(pgDistTransaction, heapTuple);
PopActiveSnapshot();
CommandCounterIncrement();