Re: Fix pg_stat_reset_single_table_counters function

From: Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers(at)lists(dot)postgresql(dot)org, mitsuru(dot)hinata(dot)5432(at)gmail(dot)com
Subject: Re: Fix pg_stat_reset_single_table_counters function
Date: 2023-08-15 05:13:46
Message-ID: 93d14a670cf090c08994f1f4958efa25@oss.nttdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2023-08-15 11:48, Masahiko Sawada wrote:
> On Mon, Aug 14, 2023 at 5:12 PM Masahiro Ikeda
> <ikedamsh(at)oss(dot)nttdata(dot)com> wrote:
>> I changed the table to check the stats from pg_database to
>> pg_shdescription
>> because the stats can update via the SQL interface COMMENT command.
>
> It seems to work well.
>
> +COMMENT ON DATABASE :current_database IS 'This is a test comment';
> -- insert or update in 'pg_shdescription'
>
> I think the current_database should be quoted (see other examples
> where using current_database(), e.g. collate.linux.utf8.sql). Also it
> would be better to reset the comment after the test.

Thanks! I fixed the issues in the v4 patch.

Regards,
--
Masahiro Ikeda
NTT DATA CORPORATION

Attachment Content-Type Size
v4-0001-Fix-pg_stat_reset_single_table_counters-function.patch text/x-diff 4.9 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2023-08-15 05:23:26 Re: Extract numeric filed in JSONB more effectively
Previous Message Zhijie Hou (Fujitsu) 2023-08-15 04:13:49 RE: [PoC] pg_upgrade: allow to upgrade publisher node