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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Add new option 'all' to pg_stat_reset_shared()
Дата
Msg-id CALj2ACVp4K9HqF0Z+k7=Fwg1N5y=74n89T8J7c2cGXFOCquRUA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add new option 'all' to pg_stat_reset_shared()  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Ответы Re: Add new option 'all' to pg_stat_reset_shared()  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-hackers
On Mon, Oct 30, 2023 at 1:47 PM Kyotaro Horiguchi
<horikyota.ntt@gmail.com> wrote:
>
> At Mon, 30 Oct 2023 16:35:19 +0900, torikoshia <torikoshia@oss.nttdata.com> wrote in
> > Hi,
> >
> > After 96f052613f3, we have below 6 types of parameter for
> > pg_stat_reset_shared().
> >
> >   "archiver", "bgwriter", "checkpointer", "io", "recovery_prefetch",
> >   "wal"
> >
> > How about adding a new option 'all' to delete all targets above?
> >
> > I imagine there are cases where people want to initialize all of them
> > at the same time in addition to initializing one at a time.
>
> FWIW, I fairly often wanted it, but forgot about that:p

Isn't calling pg_stat_reset_shared() for all stats types helping you
out? Is there any problem with it? Can you be more specific about the
use-case?

IMV, I don't see any point for adding another pseudo (rather
non-existent) shared stats target which might confuse users - it's
easy to specify pg_stat_reset_shared('all'); to clear things out when
someone actually doesn't want to reset all - an accidental usage of
the 'all' option will reset all shared memory stats.

--
Bharath Rupireddy
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com



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

Предыдущее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: Add new option 'all' to pg_stat_reset_shared()
Следующее
От: "Zhijie Hou (Fujitsu)"
Дата:
Сообщение: RE: Open a streamed block for transactional messages during decoding