Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Add temporary debugging assertion, in 9.4 branch only.
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Apr 2018 00:23:59 +0000 (20:23 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 16 Apr 2018 00:23:59 +0000 (20:23 -0400)
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.

src/backend/commands/indexcmds.c

index 05afcb0088d66f9889e0f1294974b0d0d747919e..9d48032617cfb574343e971b3c159764dceb3e87 100644 (file)
@@ -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