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

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

On 2023-11-13 13:15, torikoshia wrote:
> On 2023-11-12 16:46, Michael Paquier wrote:
>> On Fri, Nov 10, 2023 at 01:15:50PM +0900, Michael Paquier wrote:
>>> The comments added could be better grammatically, but basically LGTM.
>>> I'll take care of that if there are no objections.
>>
>> The documentation also needed a few tweaks (for DEFAULT and the
>> argument name), so I have fixed the whole and adapted the new part of
>> the docs to that, with few little tweaks.
>
> Thanks!
>
> I assume you have already taken this into account, but I think we
> should add the same documentation to the below patch for
> pg_stat_reset_slru():
>
>
> https://www.postgresql.org/message-id/CALj2ACW4Fqc_m%2BOaavrOMEivZ5aBa24pVKvoXRTmuFECsNBfAg%40mail.gmail.com
>
> On 2023-11-12 16:54, Michael Paquier wrote:
>> On Fri, Nov 10, 2023 at 08:32:34PM +0900, torikoshia wrote:
>>> On 2023-11-10 13:18, Andres Freund wrote:
>>>> I see no reason to not include slrus. We should never have added the
>>>> ability to reset them individually, particularly not without a use
>>>> case - I couldn't find one skimming some discussion. And what's the
>>>> point in not allowing to reset them via pg_stat_reset_shared()?
>>>
>>> When including SLRUs, do you think it's better to add 'slrus'
>>> argument which
>>> enables pg_stat_reset_shared() to reset all SLRUs?
>>
>> I understand that Andres says that he'd be OK with a addition of a
>> 'slru' option in pg_stat_reset_shared(), as well as including SLRUs in
>> the resets if everything should be wiped.
>
> Thanks, I'll make the patch.

Attached patch.

BTW currently the documentation explains all the arguments of
pg_stat_reset_shared() in one line and I feel it's a bit hard to read.
Attached patch uses <itemizedlist>.

What do you think?

--
Regards,

--
Atsushi Torikoshi
NTT DATA Group Corporation

Attachment Content-Type Size
v1-0001-Add-ability-to-reset-pg_stat_slru-in-pg_stat_rese.patch text/x-diff 7.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2023-11-14 13:11:50 Re: Adding facility for injection points (or probe points?) for more advanced tests
Previous Message Melanie Plageman 2023-11-14 12:46:10 Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM