Lock nodes when building ddl task lists

pull/5730/head
Hanefi Onaldi 2022-02-21 22:27:20 +03:00
parent 955eabfcd6
commit b70949ae8c
No known key found for this signature in database
GPG Key ID: F18CDB10BA0DFDC7
1 changed files with 2 additions and 1 deletions

View File

@ -1563,7 +1563,8 @@ DDLTaskList(Oid relationId, const char *commandString)
List *
NodeDDLTaskList(TargetWorkerSet targets, List *commands)
{
List *workerNodes = TargetWorkerSetNodeList(targets, NoLock);
/* don't allow concurrent node list changes that require an exclusive lock */
List *workerNodes = TargetWorkerSetNodeList(targets, RowShareLock);
if (list_length(workerNodes) <= 0)
{