From b71bae41a0cdda879db39d9946d2cc4af910bed1 Mon Sep 17 00:00:00 2001 From: Michael Paquier Date: Wed, 8 Oct 2025 12:43:40 +0900 Subject: Add stats_reset to pg_stat_user_functions It is possible to call pg_stat_reset_single_function_counters() for a single function, but the reset time was missing the system view showing its statistics. Like all the fields of pg_stat_user_functions, the GUC track_functions needs to be enabled to show the statistics about function executions. Bump catalog version. Bump PGSTAT_FILE_FORMAT_ID, as a result of the new field added to PgStat_StatFuncEntry. Author: Bertrand Drouvot Discussion: https://postgr.es/m/aONjnsaJSx-nEdfU@paquier.xyz --- src/include/utils/pgstat_internal.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/include/utils/pgstat_internal.h') diff --git a/src/include/utils/pgstat_internal.h b/src/include/utils/pgstat_internal.h index dc42d8043b5..4d2b8aa6081 100644 --- a/src/include/utils/pgstat_internal.h +++ b/src/include/utils/pgstat_internal.h @@ -691,6 +691,7 @@ extern void pgstat_database_reset_timestamp_cb(PgStatShared_Common *header, Time */ extern bool pgstat_function_flush_cb(PgStat_EntryRef *entry_ref, bool nowait); +extern void pgstat_function_reset_timestamp_cb(PgStatShared_Common *header, TimestampTz ts); /* -- cgit v1.2.3