提交 8cf66812 编写于 作者: S Soumyadeep Chakraborty

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: aee8cac8
上级 14ab8e43
......@@ -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,
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;
}
LockRelationAppendOnlySegmentFile(&aorel->rd_node,
segfile_array[i]->segno,
AccessExclusiveLock,
/* dontWait */ false);
/* Re-fetch under the write lock to get latest committed eof. */
fsinfo = GetAOCSFileSegInfo(aorel, appendOnlyMetaDataSnapshot, segno);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册