Skip to content

Commit 5ee940e

Browse files
committed
Add temporary debugging assertion, in 9.4 branch only.
Buildfarm member okapi has been failing the multiple-cic isolation test for months now, but only in 9.4. To narrow down the possible causes, add an Assert testing that CREATE INDEX CONCURRENTLY is advertising zero xmin before waiting for other transactions to end. I'm not sure that this would hold in general, so this assertion isn't meant to get released, but it passes all 9.4 regression tests for me. Will revert once we see how okapi responds.
1 parent e6b7172 commit 5ee940e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/commands/indexcmds.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ DefineIndex(Oid relationId,
773773
UnregisterSnapshot(snapshot);
774774
InvalidateCatalogSnapshot();
775775

776+
/* Temporary debug check: we should be advertising we have no snapshots. */
777+
Assert(MyPgXact->xmin == InvalidTransactionId);
778+
776779
/*
777780
* The index is now valid in the sense that it contains all currently
778781
* interesting tuples. But since it might not contain tuples deleted just

0 commit comments

Comments
 (0)