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 103b230613b Fix compile errors for pgstatfuncs.c
103b230613b is described below

commit 103b230613b76c4faedaa1d291e363f5cdd66fc1
Author: Jinbao Chen <[email protected]>
AuthorDate: Mon Oct 6 16:44:19 2025 +0800

    Fix compile errors for pgstatfuncs.c
---
 src/backend/utils/adt/pgstatfuncs.c | 100 +-----------------------------------
 1 file changed, 1 insertion(+), 99 deletions(-)

diff --git a/src/backend/utils/adt/pgstatfuncs.c 
b/src/backend/utils/adt/pgstatfuncs.c
index c1814e31259..bb2b4db93db 100644
--- a/src/backend/utils/adt/pgstatfuncs.c
+++ b/src/backend/utils/adt/pgstatfuncs.c
@@ -1771,104 +1771,6 @@ pg_stat_get_snapshot_timestamp(PG_FUNCTION_ARGS)
        PG_RETURN_TIMESTAMPTZ(ts);
 }
 
-/* Discard the active statistics snapshot */
-Datum
-pg_stat_clear_snapshot(PG_FUNCTION_ARGS)
-{
-       pgstat_clear_snapshot();
-
-       PG_RETURN_VOID();
-}
-
-
-Datum
-pg_stat_get_queue_num_exec(PG_FUNCTION_ARGS)
-{
-       Oid                     queueid = PG_GETARG_OID(0);
-       int64           result;
-       PgStat_StatQueueEntry *queueentry;
-
-       if ((queueentry = pgstat_fetch_stat_queueentry(queueid)) == NULL)
-               result = 0;
-       else
-               result = (int64) (queueentry->n_queries_exec);
-
-       PG_RETURN_INT64(result);
-}
-
-
-Datum
-pg_stat_get_queue_num_wait(PG_FUNCTION_ARGS)
-{
-       Oid                     queueid = PG_GETARG_OID(0);
-       int64           result;
-       PgStat_StatQueueEntry *queueentry;
-
-       if ((queueentry = pgstat_fetch_stat_queueentry(queueid)) == NULL)
-               result = 0;
-       else
-               result = (int64) (queueentry->n_queries_wait);
-
-       PG_RETURN_INT64(result);
-}
-
-
-Datum
-pg_stat_get_queue_elapsed_exec(PG_FUNCTION_ARGS)
-{
-       Oid                     queueid = PG_GETARG_OID(0);
-       int64           result;
-       PgStat_StatQueueEntry *queueentry;
-
-       if ((queueentry = pgstat_fetch_stat_queueentry(queueid)) == NULL)
-               result = 0;
-       else
-               result = (int64) (queueentry->elapsed_exec);
-
-       PG_RETURN_INT64(result);
-}
-
-
-Datum
-pg_stat_get_queue_elapsed_wait(PG_FUNCTION_ARGS)
-{
-       Oid                     queueid = PG_GETARG_OID(0);
-       int64           result;
-       PgStat_StatQueueEntry *queueentry;
-
-       if ((queueentry = pgstat_fetch_stat_queueentry(queueid)) == NULL)
-               result = 0;
-       else
-               result = (int64) (queueentry->elapsed_wait);
-
-       PG_RETURN_INT64(result);
-}
-
-
-/*
- * This should probably be moved to it's own file, or at least some better 
place.
- * I put it here because it uses pgstat_fetch_stat_beentry
- */
-
-#include <sys/time.h>
-#ifndef WIN32
-#include <sys/resource.h>
-#endif
-#include "lib/stringinfo.h"
-#include "cdb/cdbvars.h"
-#include "cdb/cdbdisp_query.h"
-
-/**
- * We no longer support pg_renice_session. For the time being issue an error.
- */
-Datum
-pg_renice_session(PG_FUNCTION_ARGS)
-{
-       int prio_out = -1;  
-       elog(NOTICE, "Renicing a session is not longer supported. Please use 
the Query Prioritization feature.");
-       PG_RETURN_INT32(prio_out);
-}
-
 /* Force statistics to be reported at the next occasion */
 Datum
 pg_stat_force_next_flush(PG_FUNCTION_ARGS)
@@ -2079,7 +1981,7 @@ Datum
 pg_stat_get_replication_slot(PG_FUNCTION_ARGS)
 {
 #define PG_STAT_GET_REPLICATION_SLOT_COLS 10
-       text       *slotname_text;
+       text       *slotname_text = PG_GETARG_TEXT_P(0);
        NameData        slotname;
        TupleDesc       tupdesc;
        Datum           values[PG_STAT_GET_REPLICATION_SLOT_COLS] = {0};


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to