| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Add stats_reset to pg_stat_user_functions |
| Date: | 2025-10-08 03:43:52 |
| Message-ID: | E1v6L5k-000brn-1p@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
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(dot)pg(at)gmail(dot)com>
Discussion: https://postgr.es/m/aONjnsaJSx-nEdfU@paquier.xyz
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/b71bae41a0cdda879db39d9946d2cc4af910bed1
Modified Files
--------------
doc/src/sgml/monitoring.sgml | 9 +++++++++
src/backend/catalog/system_views.sql | 3 ++-
src/backend/utils/activity/pgstat.c | 1 +
src/backend/utils/activity/pgstat_function.c | 6 ++++++
src/backend/utils/adt/pgstatfuncs.c | 18 ++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 4 ++++
src/include/pgstat.h | 3 ++-
src/include/utils/pgstat_internal.h | 1 +
src/test/isolation/expected/stats.out | 20 +++++++++++++++++++-
src/test/isolation/expected/stats_1.out | 20 +++++++++++++++++++-
src/test/isolation/specs/stats.spec | 8 ++++++--
src/test/regress/expected/rules.out | 3 ++-
13 files changed, 90 insertions(+), 8 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2025-10-08 05:14:08 | pgsql: Improve description of some WAL records for GIN |
| Previous Message | Amit Kapila | 2025-10-08 03:24:32 | pgsql: Fix typo in function header comment. |