pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add ability to reset all shared stats types in pg_stat_reset_sha
Date: Sun, 12 Nov 2023 07:44:27 +0000
Message-ID: <E1r258t-00539v-Er@gemulon.postgresql.org> (raw)

Add ability to reset all shared stats types in pg_stat_reset_shared()

Currently, pg_stat_reset_shared() can use an argument to specify the
target of statistics to reset, doing nothing for NULL as it is strict.

This patch adds to pg_stat_reset_shared() the possibility to reset all
the stats types already handled in this function rather than do nothing
if the argument value given is NULL or if nothing is specified
(proisstrict is switched to false).  Like previously, SLRUs are not
included in what gets reset.

The idea to use NULL or no argument to control if all the shared stats
already covered by this function should be reset has been proposed by
Andres Freund.

Bump catalog version.

Author: Atsushi Torikoshi
Reviewed-by: Kyotaro Horiguchi, Michael Paquier, Bharath Rupireddy,
Matthias van de Meent
Discussion: https://postgr.es/m/4291a55137ddda77cf7cc5f46e846daf@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/23c8c0c8f4721db693ef908c22f7cf754e6852a9

Modified Files
--------------
doc/src/sgml/monitoring.sgml             |  5 ++++-
src/backend/catalog/system_functions.sql |  7 +++++++
src/backend/utils/adt/pgstatfuncs.c      | 17 ++++++++++++++++-
src/include/catalog/catversion.h         |  2 +-
src/include/catalog/pg_proc.dat          |  5 +++--
src/test/regress/expected/stats.out      | 15 ++++++++-------
src/test/regress/sql/stats.sql           | 15 ++++++++-------
7 files changed, 47 insertions(+), 19 deletions(-)



Message-ID: <E1r258t-00539v-Er@gemulon.postgresql.org>
Permalink:  ../E1r258t-00539v-Er@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r258t-00539v-Er@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add ability to reset all shared stats types in pg_stat_reset_sha
  In-Reply-To: <E1r258t-00539v-Er@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox