From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | torikoshia <torikoshia(at)oss(dot)nttdata(dot)com> |
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-15 07:25:14 |
Message-ID: | ZVRyWjXccMOCcU3q@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, Nov 15, 2023 at 11:58:38AM +0900, torikoshia wrote:
> On 2023-11-15 09:47, Michael Paquier wrote:
>> You have forgotten to update the errhint at the end of
>> pg_stat_reset_shared(), where "slru" needs to be listed :)
>
> Oops, attached v2 patch.
+SELECT stats_reset > :'slru_reset_ts'::timestamptz FROM pg_stat_slru;
A problem with these two queries is that they depend on the number of
SLRUs set in the system while only returning a single 't' without the
cache names each tuple is linked to. To keep things simple, you could
just LIMIT 1 or aggregate through the whole set.
Other than that, it looks OK.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Anton A. Melnikov | 2023-11-15 08:33:44 | Re: Some performance degradation in REL_16 vs REL_15 |
Previous Message | kuroda.keisuke | 2023-11-15 07:15:34 | Re: Output affected rows in EXPLAIN |