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

Поиск
Список
Период
Сортировка
От Bharath Rupireddy
Тема Re: Add new option 'all' to pg_stat_reset_shared()
Дата
Msg-id CALj2ACW4Fqc_m+OaavrOMEivZ5aBa24pVKvoXRTmuFECsNBfAg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Add new option 'all' to pg_stat_reset_shared()  (Andres Freund <andres@anarazel.de>)
Ответы Re: Add new option 'all' to pg_stat_reset_shared()  (Michael Paquier <michael@paquier.xyz>)
Список pgsql-hackers
On Wed, Nov 8, 2023 at 9:43 AM Andres Freund <andres@anarazel.de> wrote:
>
> > 2.
> > +{ oid => '8000',
> > +  descr => 'statistics: reset collected statistics shared across the cluster',
> > +  proname => 'pg_stat_reset_shared', provolatile => 'v', prorettype => 'void',
> > +  proargtypes => '', prosrc => 'pg_stat_reset_shared_all' },
> >
> > Why a new function consuming the oid? Why can't we just do the trick
> > of proisstrict => 'f' and if (PG_ARGISNULL(0)) { reset all stats} else
> > {reset specified stats kind} like the pg_stat_reset_slru()?
>
> 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.

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

Вложения

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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Remove MSVC scripts from the tree
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: Synchronizing slots from primary to standby