From 4a8ba2c87c525ffb0270129b38210baf72263966 Mon Sep 17 00:00:00 2001 From: Xing Guo Date: Thu, 11 Apr 2024 08:00:43 +0800 Subject: [PATCH] Add comment for the assignment. --- src/backend/distributed/utils/citus_depended_object.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/backend/distributed/utils/citus_depended_object.c b/src/backend/distributed/utils/citus_depended_object.c index dc639b6e9..e54336e7d 100644 --- a/src/backend/distributed/utils/citus_depended_object.c +++ b/src/backend/distributed/utils/citus_depended_object.c @@ -483,7 +483,13 @@ AnyObjectViolatesOwnership(DropStmt *dropStmt) Relation rel = NULL; objectAddress = get_object_address(objectType, object, &rel, AccessShareLock, missingOk); - relation = rel; + /* + * The object relation is qualified with volatile and its value is obtained from + * get_object_address(). Unless we can qualify the corresponding parameter of + * get_object_address() with volatile (this is a function defined in PostgreSQL), + * we cannot get rid of this assignment. + */ + relation = rel; if (OidIsValid(objectAddress.objectId)) {