Re: when is pg_stat_archiver.stats_reset modified?

From: Ian Lawrence Barwick <barwick(at)gmail(dot)com>
To: Luca Ferrari <fluca1978(at)gmail(dot)com>
Cc: pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: when is pg_stat_archiver.stats_reset modified?
Date: 2021-02-18 11:57:26
Message-ID: CAB8KJ=i3S2+OWHuSuwhZas6BnzqXJVanA1836cb1nQahBj5s-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

2021年2月18日(木) 20:21 Luca Ferrari <fluca1978(at)gmail(dot)com>:

> Hi all,
> running on 12.5, but I guess this does not mind, I cannot understand
> when the value of pg_stat_archiver.stats_reset field is modified.
> I've executed a pg_stat_reset() but it did not affected the specified
> field.
> I suppose that field is not "resettable" by the administrator, as I
> tried to, but then what drives changes?
>

As pg_stat_archiver shows cluster-wide stats, you need
pg_stat_reset_shared().

https://www.postgresql.org/docs/current/monitoring-stats.html#MONITORING-STATS-FUNCTIONS

Regards

Ian Barwick

--
EnterpriseDB: https://www.enterprisedb.com

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Laurenz Albe 2021-02-18 12:06:50 Re: when is pg_stat_archiver.stats_reset modified?
Previous Message Joao Miguel Ferreira 2021-02-18 11:42:48 Re: permanent setting of config variables