diff options
author | Michael Paquier <michael@paquier.xyz> | 2025-10-08 12:43:40 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2025-10-08 12:43:40 +0900 |
commit | b71bae41a0cdda879db39d9946d2cc4af910bed1 (patch) | |
tree | 2a92bc7489ef681fede095f08e46a4dcf4d856d1 /src/include/pgstat.h | |
parent | 035b09131daab84f2ed9a4a3f766bf4781fd5cbf (diff) |
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 <bertranddrouvot.pg@gmail.com>
Discussion: https://postgr.es/m/aONjnsaJSx-nEdfU@paquier.xyz
Diffstat (limited to 'src/include/pgstat.h')
-rw-r--r-- | src/include/pgstat.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/include/pgstat.h b/src/include/pgstat.h index 8e8adb01176..d24bf864a22 100644 --- a/src/include/pgstat.h +++ b/src/include/pgstat.h @@ -212,7 +212,7 @@ typedef struct PgStat_TableXactStatus * ------------------------------------------------------------ */ -#define PGSTAT_FILE_FORMAT_ID 0x01A5BCB8 +#define PGSTAT_FILE_FORMAT_ID 0x01A5BCB9 typedef struct PgStat_ArchiverStats { @@ -384,6 +384,7 @@ typedef struct PgStat_StatFuncEntry PgStat_Counter total_time; /* times in microseconds */ PgStat_Counter self_time; + TimestampTz stat_reset_timestamp; } PgStat_StatFuncEntry; typedef struct PgStat_StatReplSlotEntry |