This is an automated email from the ASF dual-hosted git repository. tuhaihe pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit f95d668caf526cbee7266aaaabbd46516bb16263 Author: liushengsong <[email protected]> AuthorDate: Wed Jun 17 16:15:34 2026 +0800 Remove MERGE16_FIXME: delete dead requiredPerms stripping code in exec_mpp_query The commented-out code stripped write permissions from RTEs on non-root slices. This is unnecessary because InitPlan already skips permission checks on non-writer segments (execMain.c:1821). Additionally, PG16 moved requiredPerms from RTE to RTEPermissionInfo, making the original code incompatible. --- src/backend/tcop/postgres.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index 0a390048819..8eba8a6d227 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -1300,28 +1300,6 @@ exec_mpp_query(const char *query_string, elog(ERROR, "MPPEXEC: received non-DML Plan"); commandType = plan->commandType; - // MERGE16_FIXME: Check if wo should remove requiredPerms in Query -// if ( slice ) -// { -// /* Non root slices don't need update privileges. */ -// if (sliceTable->localSlice != slice->rootIndex) -// { -// ListCell *rtcell; -// RangeTblEntry *rte; -// RTEPermissionInfo *rte_permission; -// AclMode removeperms = ACL_INSERT | ACL_UPDATE | ACL_DELETE | ACL_SELECT_FOR_UPDATE; -// -// /* Just reading, so don't check INS/DEL/UPD permissions. */ -// foreach(rtcell, plan->rtable) -// { -// rte = (RangeTblEntry *)lfirst(rtcell); -// if (rte->rtekind == RTE_RELATION && -// 0 != (rte->requiredPerms & removeperms)) -// rte->requiredPerms &= ~removeperms; -// } -// } -// } - if (log_statement != LOGSTMT_NONE) { /* --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
