summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2018-04-15 20:23:59 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2018-04-15 20:23:59 -0400
commit5ee940e1cdb6af3af52bb01e44aac63f3a73a28d (patch)
treefcdbf955e64e91ef717906d8e4bc756b5de315e2 /src
parente6b71727afc148f90967f4d7ca5cb29891ba2c6c (diff)
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/commands/indexcmds.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/backend/commands/indexcmds.c b/src/backend/commands/indexcmds.c
index 05afcb0088d..9d48032617c 100644
--- a/src/backend/commands/indexcmds.c
+++ b/src/backend/commands/indexcmds.c
@@ -773,6 +773,9 @@ DefineIndex(Oid relationId,
UnregisterSnapshot(snapshot);
InvalidateCatalogSnapshot();
+ /* Temporary debug check: we should be advertising we have no snapshots. */
+ Assert(MyPgXact->xmin == InvalidTransactionId);
+
/*
* The index is now valid in the sense that it contains all currently
* interesting tuples. But since it might not contain tuples deleted just