diff options
author | Michael Paquier <michael@paquier.xyz> | 2023-11-12 16:43:12 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2023-11-12 16:43:12 +0900 |
commit | 23c8c0c8f4721db693ef908c22f7cf754e6852a9 (patch) | |
tree | e341cde26bef880bd33b4c5eb542c139f4ccac25 /doc/src | |
parent | a9f19c1349c22819038842a0debba2c86b4832b8 (diff) | |
download | postgresql-23c8c0c8f4721db693ef908c22f7cf754e6852a9.tar.gz postgresql-23c8c0c8f4721db693ef908c22f7cf754e6852a9.zip |
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
Diffstat (limited to 'doc/src')
-rw-r--r-- | doc/src/sgml/monitoring.sgml | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index e068f7e2475..b8495b64989 100644 --- a/doc/src/sgml/monitoring.sgml +++ b/doc/src/sgml/monitoring.sgml @@ -4712,7 +4712,7 @@ description | Waiting for a newly initialized WAL file to reach durable storage <indexterm> <primary>pg_stat_reset_shared</primary> </indexterm> - <function>pg_stat_reset_shared</function> ( <type>text</type> ) + <function>pg_stat_reset_shared</function> ( [ <parameter>target</parameter> <type>text</type> <literal>DEFAULT</literal> <literal>NULL</literal> ] ) <returnvalue>void</returnvalue> </para> <para> @@ -4730,6 +4730,9 @@ description | Waiting for a newly initialized WAL file to reach durable storage <structname>pg_stat_wal</structname> view or <literal>recovery_prefetch</literal> to reset all the counters shown in the <structname>pg_stat_recovery_prefetch</structname> view. + If <parameter>target</parameter> is <literal>NULL</literal> or + is not specified, all the counters from the views listed above are + reset. </para> <para> This function is restricted to superusers by default, but other users |