Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset - Mailing list pgsql-hackers

From Andres Freund
Subject Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset
Date
Msg-id 20220330203927.djyc3ifjgyao7lv7@alap3.anarazel.de
Whole thread Raw
In response to Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: pg_stat_reset_single_*_counters vs pg_stat_database.stats_reset
List pgsql-hackers
Hi,

On 2022-03-30 12:29:51 -0700, David G. Johnston wrote:
> On Wednesday, March 30, 2022, Andres Freund <andres@anarazel.de> wrote:
> > My current proposal is to just have two reset times. One for the contents
> > of
> > pg_stat_database (i.e. not affected by pg_stat_reset_single_*_counters()),
> > and
> > one for stats within the entire database.

> What IS it affected by?  And does whatever affects it affect anything else?

pg_stat_reset() resets the current database's stats. That includes the
database's row in pg_stat_database and all table and function stats.

Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: James Coleman
Date:
Subject: Re: Correct docs re: rewriting indexes when table rewrite is skipped
Next
From: Andres Freund
Date:
Subject: Re: Higher level questions around shared memory stats