From 21028434ce92088ee1a57752f5894e1ce19eee5e Mon Sep 17 00:00:00 2001 From: Nitish Upreti Date: Sat, 27 Aug 2022 20:12:29 -0700 Subject: [PATCH] Add operation name for drop --- src/backend/distributed/operations/shard_cleaner.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/backend/distributed/operations/shard_cleaner.c b/src/backend/distributed/operations/shard_cleaner.c index fbb69e1cc..f4a81c0d5 100644 --- a/src/backend/distributed/operations/shard_cleaner.c +++ b/src/backend/distributed/operations/shard_cleaner.c @@ -582,9 +582,13 @@ TryLockRelationAndPlacementCleanup(Oid relationId, LOCKMODE lockmode) static bool TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nodePort) { - ereport(LOG, (errmsg("dropping shard placement %s " + char *operation = (CurrentOperationId == INVALID_OPERATION_ID) ? "move" : "cleanup"; + ereport(LOG, (errmsg("dropping shard %s for %s " "on %s:%d", - qualifiedTableName, nodeName, nodePort))); + qualifiedTableName, + operation, + nodeName, + nodePort))); /* prepare sql query to execute to drop the shard */ StringInfo dropQuery = makeStringInfo(); @@ -603,8 +607,7 @@ TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nod dropQuery->data); /* remove the shard from the node */ - bool success = true; - SendOptionalCommandListToWorkerOutsideTransaction(nodeName, + bool success = SendOptionalCommandListToWorkerOutsideTransaction(nodeName, nodePort, NULL, dropCommandList);