Skip to content

Commit

Permalink
Fix active snapshot checks
Browse files Browse the repository at this point in the history
  • Loading branch information
pashkinelfe committed Oct 22, 2024
1 parent 94d572f commit b8f5450
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/backend/executor/execMain.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ standard_ExecutorStart(QueryDesc *queryDesc, int eflags)
Assert(queryDesc->estate == NULL);

/* caller must ensure the query's snapshot is active */
Assert(GetActiveSnapshot() == queryDesc->snapshot);
Assert((ActiveSnapshotSet() ? GetActiveSnapshot() : InvalidSnapshot) == queryDesc->snapshot);

/*
* If the transaction is read-only, we need to check if any writes are
Expand Down Expand Up @@ -325,7 +325,7 @@ standard_ExecutorRun(QueryDesc *queryDesc,
Assert(!(estate->es_top_eflags & EXEC_FLAG_EXPLAIN_ONLY));

/* caller must ensure the query's snapshot is active */
Assert(GetActiveSnapshot() == estate->es_snapshot);
Assert((ActiveSnapshotSet() ? GetActiveSnapshot() : InvalidSnapshot) == estate->es_snapshot);

/*
* Switch into per-query memory context
Expand Down

0 comments on commit b8f5450

Please sign in to comment.