Re: Warning about using pg_stat_reset() and pg_stat_reset_shared()

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Warning about using pg_stat_reset() and pg_stat_reset_shared()
Date: 2022-10-04 22:07:49
Message-ID: CAApHDvr=tZFToH97Jrom0d-V9xzcW6qVagewkKD17VNU3xj69Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 29 Sept 2022 at 04:45, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
>
> We have discussed the problems caused by the use of pg_stat_reset() and
> pg_stat_reset_shared(), specifically the removal of information needed
> by autovacuum. I don't see these risks documented anywhere. Should we
> do that? Are there other risks?

There was some discussion in [1] a few years back. A few people were
for the warning. Nobody seemed to object to it. There's a patch in
[2].

David

[1] https://www.postgresql.org/message-id/flat/CAKJS1f8DTbCHf9gedU0He6ARsd58E6qOhEHM1caomqj_r9MOiQ%40mail.gmail.com
[2] https://www.postgresql.org/message-id/CAKJS1f80o98hcfSk8j%3DfdN09S7Sjz%2BvuzhEwbyQqvHJb_sZw0g%40mail.gmail.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2022-10-04 22:32:24 Re: [PATCH] Expand character set for ltree labels
Previous Message Zhihong Yu 2022-10-04 21:45:11 Re: [POC] Allow flattening of subquery with a link to upper query