diff options
author | Michael Paquier <michael@paquier.xyz> | 2023-11-14 09:50:52 +0900 |
---|---|---|
committer | Michael Paquier <michael@paquier.xyz> | 2023-11-14 09:50:52 +0900 |
commit | e5cca6288a4098cf731599b5977b0f6714ba0ac6 (patch) | |
tree | a4b79179ae0ab97b369e860dbd6717d87066474f /src/backend | |
parent | a70f2a57f233244c0a780829baf48c624187d456 (diff) | |
download | postgresql-e5cca6288a4098cf731599b5977b0f6714ba0ac6.tar.gz postgresql-e5cca6288a4098cf731599b5977b0f6714ba0ac6.zip |
Add support for pg_stat_reset_slru without argument
pg_stat_reset_slru currently requires an input argument, either:
- NULL to reset the SLRU counters of everything.
- A specific value to reset a single SLRU cache.
This commit adds support for a new pattern: pg_stat_reset_slru without
any argument works the same way as pg_stat_reset_slru(NULL), relying on
a DEFAULT in the function definition to handle this case. This makes
the function more consistent with 23c8c0c8f472.
Bump catalog version.
Author: Bharath Rupireddy
Reviewed-by: Atsushi Torikoshi
Discussion: https://postgr.es/m/CALj2ACW1VizYg01EeH_cA-7qA+4NzWVAoZ5Lw9_XYO1RRHAZbA@mail.gmail.com
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/catalog/system_functions.sql | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/backend/catalog/system_functions.sql b/src/backend/catalog/system_functions.sql index 8079f1cd7ff..4206752881d 100644 --- a/src/backend/catalog/system_functions.sql +++ b/src/backend/catalog/system_functions.sql @@ -628,6 +628,13 @@ LANGUAGE INTERNAL CALLED ON NULL INPUT VOLATILE PARALLEL SAFE AS 'pg_stat_reset_shared'; +CREATE OR REPLACE FUNCTION + pg_stat_reset_slru(target text DEFAULT NULL) +RETURNS void +LANGUAGE INTERNAL +CALLED ON NULL INPUT VOLATILE PARALLEL SAFE +AS 'pg_stat_reset_slru'; + -- -- The default permissions for functions mean that anyone can execute them. -- A number of functions shouldn't be executable by just anyone, but rather |