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 target "slru" to pg_stat_reset_shared()
Date: Thu, 16 Nov 2023 06:48:04 +0000
Message-ID: <E1r3WAV-005gX7-My@gemulon.postgresql.org> (raw)

Add target "slru" to pg_stat_reset_shared()

Currently, pg_stat_reset_shared() cannot reset the counters in the view
pg_stat_slru even if it is a type of shared stats.  This patch adds
support for a new value in pg_stat_reset_shared(), called "slru", able
to do that.  Note that pg_stat_reset_shared(NULL) also resets SLRU
counters.

There may be a point in removing pg_stat_reset_slru() that was
introduced in 28cac71bd368 (v13~) as the new option overlaps with this
function, but we would lose the ability to reset individual SLRU
counters.  This is left for future reconsideration.

Author: Atsushi Torikoshi
Discussion: https://postgr.es/m/e3c25d72e81378e7b64f3c52e0306fc9@oss.nttdata.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/2e8a0edc2a3321582d5da65690b0371654c7a44f

Modified Files
--------------
doc/src/sgml/monitoring.sgml        |  6 ++++++
src/backend/utils/adt/pgstatfuncs.c |  5 ++++-
src/test/regress/expected/stats.out | 23 ++++++++++++++++++++++-
src/test/regress/sql/stats.sql      |  7 +++++++
4 files changed, 39 insertions(+), 2 deletions(-)



Message-ID: <E1r3WAV-005gX7-My@gemulon.postgresql.org>
Permalink:  ../E1r3WAV-005gX7-My@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1r3WAV-005gX7-My@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 target "slru" to pg_stat_reset_shared()
  In-Reply-To: <E1r3WAV-005gX7-My@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