Re: Add new option 'all' to pg_stat_reset_shared()

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, torikoshia <torikoshia(at)oss(dot)nttdata(dot)com>, boekewurm+postgres(at)gmail(dot)com, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Add new option 'all' to pg_stat_reset_shared()
Date: 2023-11-08 23:58:48
Message-ID: ZUwguPB1rTXBK5CT@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Nov 08, 2023 at 02:15:24PM +0530, Bharath Rupireddy wrote:
> On Wed, Nov 8, 2023 at 9:43 AM Andres Freund <andres(at)anarazel(dot)de> wrote:
>> It's not like oids are a precious resource. It's a more confusing API to have
>> to have to specify a NULL as an argument than not having to do so. If we
>> really want to avoid a separate oid, a more sensible path would be to add a
>> default argument to pg_stat_reset_slru() (by doing a CREATE OR REPLACE in
>> system_functions.sql).
>
> +1. Attached the patch.
>
> -- Test that multiple SLRUs are reset when no specific SLRU provided to reset function
> -SELECT pg_stat_reset_slru(NULL);
> +SELECT pg_stat_reset_slru();

For the SLRU part, why not.

Hmm. What's the final plan for pg_stat_reset_shared(), then? An
equivalent that calls a series of pgstat_reset_of_kind()?
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2023-11-09 00:00:01 Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)
Previous Message Andres Freund 2023-11-08 23:53:58 Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)