Re: Resetting spilled txn statistics in pg_stat_replication

From: Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>
To: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Resetting spilled txn statistics in pg_stat_replication
Date: 2020-06-02 13:24:16
Message-ID: CA+fd4k6GC7zBT_iABJibVT21+hTd1x7kdeV4QLxNnJehbTxxRg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, 2 Jun 2020 at 16:00, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote:
>
> At Tue, 2 Jun 2020 15:17:36 +0900, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com> wrote in
> > Hi all,
> >
> > Tracking of spilled transactions has been introduced to PG13. These
> > new statistics values, spill_txns, spill_count, and spill_bytes, are
> > cumulative total values unlike other statistics values in
> > pg_stat_replication. How can we reset these values? We can reset
> > statistics values in other statistics views using by
> > pg_stat_reset_shared(), pg_stat_reset() and so on. It seems to me that
> > the only option to reset spilled transactions is to restart logical
> > replication but it's surely high cost.
> >
> > It might have been discussed during development but it's worth having
> > a SQL function to reset these statistics?
>
> Actually, I don't see pg_stat_reset() useful so much except for our
> regression test (or might be rather harmful for monitoring aids). So
> I doubt the usefulness of the feature, but having it makes things more
> consistent.

IMO these reset functions are useful for verifications. I often use
them before starting performance evaluations.

Regards,

--
Masahiko Sawada http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dmitry Dolgov 2020-06-02 13:40:06 Re: Index Skip Scan
Previous Message Andy Fan 2020-06-02 12:36:31 Re: Index Skip Scan