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
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(-)