mirror of https://github.com/citusdata/citus.git
PG18: fix yet another unregistered snapshot crash (#8228)
PG18 added an assertion that a snapshot is active or registered before
it's used. Relevant PG commit
8076c00592
Fixes #8209
pull/8227/head
parent
d4dfdd765b
commit
5a3648b2cb
|
|
@ -1245,10 +1245,14 @@ LogRelationStats(Relation rel, int elevel)
|
||||||
foreach(stripeMetadataCell, stripeList)
|
foreach(stripeMetadataCell, stripeList)
|
||||||
{
|
{
|
||||||
StripeMetadata *stripe = lfirst(stripeMetadataCell);
|
StripeMetadata *stripe = lfirst(stripeMetadataCell);
|
||||||
|
|
||||||
|
Snapshot snapshot = RegisterSnapshot(GetTransactionSnapshot());
|
||||||
StripeSkipList *skiplist = ReadStripeSkipList(relfilelocator, stripe->id,
|
StripeSkipList *skiplist = ReadStripeSkipList(relfilelocator, stripe->id,
|
||||||
RelationGetDescr(rel),
|
RelationGetDescr(rel),
|
||||||
stripe->chunkCount,
|
stripe->chunkCount,
|
||||||
GetTransactionSnapshot());
|
snapshot);
|
||||||
|
UnregisterSnapshot(snapshot);
|
||||||
|
|
||||||
for (uint32 column = 0; column < skiplist->columnCount; column++)
|
for (uint32 column = 0; column < skiplist->columnCount; column++)
|
||||||
{
|
{
|
||||||
bool attrDropped = Attr(tupdesc, column)->attisdropped;
|
bool attrDropped = Attr(tupdesc, column)->attisdropped;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue