diff --git a/src/backend/distributed/commands/extension.c b/src/backend/distributed/commands/extension.c index 9b57a3ea4..a4b1bf275 100644 --- a/src/backend/distributed/commands/extension.c +++ b/src/backend/distributed/commands/extension.c @@ -149,16 +149,6 @@ PostprocessCreateExtensionStmt(Node *node, const char *queryString) /* extension management can only be done via coordinator node */ EnsureCoordinator(); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - * This guarantees that all active nodes will have the extension, because they will - * either get it now, or get it in citus_add_node after this transaction finishes and - * the pg_dist_object record becomes visible. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - /* * Make sure that the current transaction is already in sequential mode, * or can still safely be put in sequential mode @@ -262,16 +252,6 @@ PreprocessDropExtensionStmt(Node *node, const char *queryString, /* extension management can only be done via coordinator node */ EnsureCoordinator(); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - * This guarantees that all active nodes will drop the extension, because they will - * either get it now, or get it in citus_add_node after this transaction finishes and - * the pg_dist_object record becomes visible. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - /* * Make sure that the current transaction is already in sequential mode, * or can still safely be put in sequential mode @@ -398,15 +378,6 @@ PreprocessAlterExtensionSchemaStmt(Node *node, const char *queryString, /* extension management can only be done via coordinator node */ EnsureCoordinator(); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - * This guarantees that all active nodes will update the extension schema after - * this transaction finishes and the pg_dist_object record becomes visible. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - /* * Make sure that the current transaction is already in sequential mode, * or can still safely be put in sequential mode @@ -466,16 +437,6 @@ PreprocessAlterExtensionUpdateStmt(Node *node, const char *queryString, /* extension management can only be done via coordinator node */ EnsureCoordinator(); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - * This guarantees that all active nodes will update the extension version, because - * they will either get it now, or get it in citus_add_node after this transaction - * finishes and the pg_dist_object record becomes visible. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - /* * Make sure that the current transaction is already in sequential mode, * or can still safely be put in sequential mode diff --git a/src/backend/distributed/commands/role.c b/src/backend/distributed/commands/role.c index 511f54f3c..9bd4d5d44 100644 --- a/src/backend/distributed/commands/role.c +++ b/src/backend/distributed/commands/role.c @@ -140,13 +140,6 @@ PostprocessAlterRoleStmt(Node *node, const char *queryString) AlterRoleStmt *stmt = castNode(AlterRoleStmt, node); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - DefElem *option = NULL; foreach_ptr(option, stmt->options) { diff --git a/src/backend/distributed/commands/type.c b/src/backend/distributed/commands/type.c index 83cdc1a6b..5c2c3f48c 100644 --- a/src/backend/distributed/commands/type.c +++ b/src/backend/distributed/commands/type.c @@ -130,16 +130,6 @@ PreprocessCompositeTypeStmt(Node *node, const char *queryString, */ EnsureCoordinator(); - /* - * Make sure that no new nodes are added after this point until the end of the - * transaction by taking a RowShareLock on pg_dist_node, which conflicts with the - * ExclusiveLock taken by citus_add_node. - * This guarantees that all active nodes will have the object, because they will - * either get it now, or get it in citus_add_node after this transaction finishes and - * the pg_dist_object record becomes visible. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - /* fully qualify before lookup and later deparsing */ QualifyTreeNode(node); diff --git a/src/backend/distributed/metadata/node_metadata.c b/src/backend/distributed/metadata/node_metadata.c index 5640f2c81..6da08c02e 100644 --- a/src/backend/distributed/metadata/node_metadata.c +++ b/src/backend/distributed/metadata/node_metadata.c @@ -180,9 +180,6 @@ citus_set_coordinator_host(PG_FUNCTION_ARGS) Name nodeClusterName = PG_GETARG_NAME(3); nodeMetadata.nodeCluster = NameStr(*nodeClusterName); - /* prevent concurrent modification */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - bool isCoordinatorInMetadata = false; WorkerNode *coordinatorNode = PrimaryNodeForGroup(COORDINATOR_GROUP_ID, &isCoordinatorInMetadata); @@ -1410,12 +1407,6 @@ AddNodeMetadata(char *nodeName, int32 nodePort, *nodeAlreadyExists = false; - /* - * Prevent / wait for concurrent modification before checking whether - * the worker already exists in pg_dist_node. - */ - LockRelationOid(DistNodeRelationId(), RowShareLock); - WorkerNode *workerNode = FindWorkerNodeAnyCluster(nodeName, nodePort); if (workerNode != NULL) {