From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: pgstat: set timestamps of fixed-numbered stats after a crash.
Date: Fri, 15 Apr 2022 00:41:37 +0000
Message-ID: <E1nfA1p-000YU3-Ml@gemulon.postgresql.org> (raw)
pgstat: set timestamps of fixed-numbered stats after a crash.
When not loading stats at startup (i.e. pgstat_discard_stats() getting
called), reset timestamps of fixed numbered stats would be left at
0. Oversight in 5891c7a8ed8.
Instead use pgstat_reset_after_failure() and add tests verifying that
fixed-numbered reset timestamps are set appropriately.
Reported-By: "David G. Johnston" <david.g.johnston@gmail.com>
Discussion: https://postgr.es/m/CAKFQuwamFuaQHKdhcMt4Gbw5+Hca2UE741B8gOOXoA=TtAd2Yw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/5cd1c40b3ce9600f129fd1fea9850e1affaf31d5
Modified Files
--------------
src/backend/utils/activity/pgstat.c | 22 ++++++++++++++--------
src/test/recovery/t/029_stats_restart.pl | 10 ++++++++++
2 files changed, 24 insertions(+), 8 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de
Subject: Re: pgsql: pgstat: set timestamps of fixed-numbered stats after a crash.
In-Reply-To: <E1nfA1p-000YU3-Ml@gemulon.postgresql.org>
References: <E1nfA1p-000YU3-Ml@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox