Re: Fix pg_stat_reset_single_table_counters function

From: Andres Freund <andres(at)anarazel(dot)de>
To: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
Cc: Masahiro Ikeda <ikedamsh(at)oss(dot)nttdata(dot)com>, 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-12 19:12:07
Message-ID: 20230812191207.aerskqox7aoan3ud@awork3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2023-08-10 17:48:10 +0900, Masahiko Sawada wrote:
> Good catch! I've confirmed that the issue has been fixed by your patch.

Indeed.

> However, I'm not sure the added regression tests are stable since
> autovacuum workers may scan the pg_database and increment the
> statistics after resetting the stats.

What about updating the table and checking the update count is reset? That'd
not be reset by autovacuum.

Greetings,

Andres Freund

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2023-08-12 20:05:04 Re: Performance degradation on concurrent COPY into a single relation in PG16.
Previous Message Andres Freund 2023-08-12 18:25:59 Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }