This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new 99d879b233d Fix compile errors for tcop
99d879b233d is described below
commit 99d879b233d6f5e1ab67615450df8baa731e96ac
Author: Jinbao Chen <[email protected]>
AuthorDate: Sun Oct 5 20:10:26 2025 +0800
Fix compile errors for tcop
---
src/backend/tcop/postgres.c | 52 +++++++++++++++++++--------------------------
src/include/utils/elog.h | 2 +-
2 files changed, 23 insertions(+), 31 deletions(-)
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index b57f65c68d1..2efcee1edb3 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -178,7 +178,7 @@ static long max_stack_depth_bytes = 100 * 1024L;
* Stack base pointer -- initialized by PostmasterMain and inherited by
* subprocesses (but see also InitPostmasterChild).
*/
-static char *stack_base_ptr = NULL;
+char *stack_base_ptr = NULL;
/*
* Flag to keep track of whether we have started a transaction.
@@ -1294,25 +1294,27 @@ exec_mpp_query(const char *query_string,
elog(ERROR, "MPPEXEC: received non-DML Plan");
commandType = plan->commandType;
- if ( slice )
- {
- /* Non root slices don't need update privileges. */
- if (sliceTable->localSlice != slice->rootIndex)
- {
- ListCell *rtcell;
- RangeTblEntry *rte;
- 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;
- }
- }
- }
+ // 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)
{
@@ -1486,12 +1488,6 @@ exec_mpp_query(const char *query_string,
receiver,
&qc);
- /*
- * If writer QE, sent current pgstat for tables to QD.
- */
- if (Gp_role == GP_ROLE_EXECUTE && Gp_is_writer)
- pgstat_send_qd_tabstats();
-
(*receiver->rDestroy) (receiver);
PortalDrop(portal, false);
@@ -1806,8 +1802,6 @@ exec_simple_query(const char *query_string)
Portal portal;
DestReceiver *receiver;
int16 format;
- const char *cmdtagname;
- size_t cmdtaglen;
pgstat_report_query_id(0, true);
@@ -5745,8 +5739,6 @@ PostgresMain(const char *dbname, const char *username)
if (notifyInterruptPending)
ProcessNotifyInterrupt(false);
- pgstat_report_queuestat();
-
/*
* Check if we need to report stats. If
pgstat_report_stat()
* decides it's too soon to flush out pending
stats / lock
diff --git a/src/include/utils/elog.h b/src/include/utils/elog.h
index 4cd3971d928..596b99528ae 100644
--- a/src/include/utils/elog.h
+++ b/src/include/utils/elog.h
@@ -442,7 +442,7 @@ extern PGDLLIMPORT ErrorContextCallback
*error_context_stack;
ErrorContextCallback *_save_context_stack##__VA_ARGS__ =
error_context_stack; \
sigjmp_buf _local_sigjmp_buf##__VA_ARGS__; \
bool _do_rethrow##__VA_ARGS__ = false; \
- int _saved_dispatch_nest_level pg_attribute_unused() =
dispatch_nest_level; \
+ int _saved_dispatch_nest_level##__VA_ARGS__
pg_attribute_unused() = dispatch_nest_level; \
if (sigsetjmp(_local_sigjmp_buf##__VA_ARGS__, 0) == 0) \
{ \
PG_exception_stack = &_local_sigjmp_buf##__VA_ARGS__
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]