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

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: Add new option 'all' to pg_stat_reset_shared()
Дата
Msg-id ZVRyWjXccMOCcU3q@paquier.xyz
обсуждение исходный текст
Ответ на Re: Add new option 'all' to pg_stat_reset_shared()  (torikoshia <torikoshia@oss.nttdata.com>)
Ответы Re: Add new option 'all' to pg_stat_reset_shared()  (Michael Paquier <michael@paquier.xyz>)
Список 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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: kuroda.keisuke@nttcom.co.jp
Дата:
Сообщение: Re: Output affected rows in EXPLAIN
Следующее
От: "Anton A. Melnikov"
Дата:
Сообщение: Re: Some performance degradation in REL_16 vs REL_15