RE: Resetting spilled txn statistics in pg_stat_replication

Поиск
Список
Период
Сортировка
От Shinoda, Noriyoshi (PN Japan A&PS Delivery)"
Тема RE: Resetting spilled txn statistics in pg_stat_replication
Дата
Msg-id TU4PR8401MB115297EF936A7675A5644151EE050@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM
обсуждение исходный текст
Ответ на Re: Resetting spilled txn statistics in pg_stat_replication  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Ответы Re: Resetting spilled txn statistics in pg_stat_replication  (Masahiko Sawada <masahiko.sawada@2ndquadrant.com>)
Список pgsql-hackers
Thanks for your comment.

> 8.3. Character Types:
> The name type exists only for the storage of identifiers in the internal system catalogs

I didn't know the policy about data types. Thank you.
But I think the column names should match pg_replication_slots.
The attached patch changes only the column names and macros.

Regards,
Noriyoshi Shinoda

-----Original Message-----
From: Masahiko Sawada [mailto:masahiko.sawada@2ndquadrant.com] 
Sent: Tuesday, October 13, 2020 9:11 AM
To: Shinoda, Noriyoshi (PN Japan A&PS Delivery) <noriyoshi.shinoda@hpe.com>
Cc: Amit Kapila <amit.kapila16@gmail.com>; Dilip Kumar <dilipbalaut@gmail.com>; Magnus Hagander <magnus@hagander.net>;
TomasVondra <tomas.vondra@2ndquadrant.com>; PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>; Ajin Cherian
<itsajin@gmail.com>
Subject: Re: Resetting spilled txn statistics in pg_stat_replication

(Please avoid top-posting)

On Mon, 12 Oct 2020 at 23:45, Shinoda, Noriyoshi (PN Japan A&PS
Delivery) <noriyoshi.shinoda@hpe.com> wrote:
>
> Sawada-san, Thank you your comments.
>
> The attached patch reflects the comment.
> I also made a fix for the regression test.
>
> Regards,
> Noriyoshi Shinoda
>
> -----Original Message-----
> From: Masahiko Sawada [mailto:masahiko.sawada@2ndquadrant.com]
> Sent: Monday, October 12, 2020 8:12 PM
> To: Shinoda, Noriyoshi (PN Japan A&PS Delivery) 
> <noriyoshi.shinoda@hpe.com>
> Cc: Amit Kapila <amit.kapila16@gmail.com>; Dilip Kumar 
> <dilipbalaut@gmail.com>; Magnus Hagander <magnus@hagander.net>; Tomas 
> Vondra <tomas.vondra@2ndquadrant.com>; PostgreSQL Hackers 
> <pgsql-hackers@lists.postgresql.org>; Ajin Cherian <itsajin@gmail.com>
> Subject: Re: Resetting spilled txn statistics in pg_stat_replication
>
> On Mon, 12 Oct 2020 at 18:29, Shinoda, Noriyoshi (PN Japan A&PS
> Delivery) <noriyoshi.shinoda@hpe.com> wrote:
> >
> > Hi, thank you for the awesome feature.
> >
>
> Thank you for reporting!
>
> > As it may have been discussed, I think the 'name' column in pg_stat_replication_slots is more consistent with the
columnname and data type matched to the pg_replication_slots catalog.
 
> > The attached patch changes the name and data type of the 'name' column to slot_name and 'name' type, respectively.
>
> It seems a good idea to me. In other system views, we use the name data type for object name. When I wrote the first
patch,I borrowed the code for pg_stat_slru which uses text data for the name but I think it's an oversight.
 

Hmm, my above observation is wrong. All other statistics use text data type and internally use char[NAMEDATALEN]. So I
thinkrenaming to 'slot_name' would be a good idea but probably we don’t need to change the internally used data type.
Forthe data type of slot_name of pg_stat_replication_slots view, given that the doc says the following[1], I think we
cankeep it too as this view is not a system catalog. What do you think?
 

8.3. Character Types:
The name type exists only for the storage of identifiers in the internal system catalogs

[1] https://www.postgresql.org/docs/devel/datatype-character.html 

Regards,

--
Masahiko Sawada            http://www.2ndQuadrant.com/ 
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Вложения

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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Assertion failure with LEFT JOINs among >500 relations
Следующее
От: Masahiko Sawada
Дата:
Сообщение: Re: Transactions involving multiple postgres foreign servers, take 2