Get the table-level locks before the advisory lock

pull/5159/head
Sait Talha Nisanci 2021-08-16 13:23:05 +03:00
parent d8d86629e5
commit 7c55c41a83
1 changed files with 6 additions and 1 deletions

View File

@ -139,7 +139,12 @@ PreprocessDropTableStmt(Node *node, const char *queryString,
continue;
}
if(PartitionTable(relationId)) {
Oid parentId = PartitionParentOid(relationId);
LockRelationOid(parentId, AccessExclusiveLock);
LockRelationOid(relationId, AccessExclusiveLock);
LockParentShardResourcesForShardsOfPartition(relationId);
}
if (IsCitusTableType(relationId, REFERENCE_TABLE))
{