Oid newIndexId = lfirst_oid(lc2);
Oid heapId;
- CHECK_FOR_INTERRUPTS();
-
/* Start new transaction for this index's concurrent build */
StartTransactionCommand();
+ /*
+ * Check for user-requested abort. This is inside a transaction so as
+ * xact.c does not issue a useless WARNING, and ensures that
+ * session-level locks are cleaned up on abort.
+ */
+ CHECK_FOR_INTERRUPTS();
+
/* Set ActiveSnapshot since functions in the indexes may need it */
PushActiveSnapshot(GetTransactionSnapshot());
TransactionId limitXmin;
Snapshot snapshot;
- CHECK_FOR_INTERRUPTS();
-
StartTransactionCommand();
+ /*
+ * Check for user-requested abort. This is inside a transaction so as
+ * xact.c does not issue a useless WARNING, and ensures that
+ * session-level locks are cleaned up on abort.
+ */
+ CHECK_FOR_INTERRUPTS();
+
heapId = IndexGetRelation(newIndexId, false);
/*
Oid newIndexId = lfirst_oid(lc2);
Oid heapId;
+ /*
+ * Check for user-requested abort. This is inside a transaction so as
+ * xact.c does not issue a useless WARNING, and ensures that
+ * session-level locks are cleaned up on abort.
+ */
CHECK_FOR_INTERRUPTS();
heapId = IndexGetRelation(oldIndexId, false);
Oid oldIndexId = lfirst_oid(lc);
Oid heapId;
+ /*
+ * Check for user-requested abort. This is inside a transaction so as
+ * xact.c does not issue a useless WARNING, and ensures that
+ * session-level locks are cleaned up on abort.
+ */
CHECK_FOR_INTERRUPTS();
+
heapId = IndexGetRelation(oldIndexId, false);
index_concurrently_set_dead(heapId, oldIndexId);
}