Port: Ensure AOCS segment file drop blocks on the AccessExclusiveLock
This was added as a part of a fix for the vacuum segment file drop phase
for AOCS tables on 5X_STABLE:
@@ -461,23 +461,15 @@ AOCSDrop(Relation aorel,
}
/*
- * Try to get the transaction write-lock for the Append-Only segment
- * file.
+ * Get the transaction write-lock for the Append-Only segment file.
*
* NOTE: This is a transaction scope lock that must be held until
* commit / abort.
*/
- acquireResult = LockRelationAppendOnlySegmentFile(
- &aorel->rd_node,
+ LockRelationAppendOnlySegmentFile(&aorel->rd_node,
segfile_array[i]->segno,
AccessExclusiveLock,
- /* dontWait */ true);
- if (acquireResult == LOCKACQUIRE_NOT_AVAIL)
- {
- elog(DEBUG5, "drop skips AOCS segfile %d, "
- "relation %s", segfile_array[i]->segno, relname);
- continue;
- }
+ /* dontWait */ false);
/* Re-fetch under the write lock to get latest committed eof. */
fsinfo = GetAOCSFileSegInfo(aorel, appendOnlyMetaDataSnapshot, segno);
