pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix stats_fetch_consistency with stats for fixed-numbered object
Date: Thu, 01 Feb 2024 08:14:30 +0000
Message-ID: <E1rVSDO-0047bN-G4@gemulon.postgresql.org> (raw)

Fix stats_fetch_consistency with stats for fixed-numbered objects

This impacts the statistics retrieved in transactions for the following
views when updating the value of stats_fetch_consistency, leading to
behaviors contrary to what is documented since 605994651b6a as an update
of this parameter should discard all statistics snapshot data:
- pg_stat_archiver
- pg_stat_bgwriter
- pg_stat_checkpointer
- pg_stat_io
- pg_stat_slru
- pg_stat_wal

For example, updating stats_fetch_consistency from "snapshot" to "cache"
in a transaction did not re-fetch any fresh data, using data cached from
the time when "snapshot" was in use.

Author: Shinya Kato
Discussion: https://postgr.es/m/d77fc5190d4dbe1738d77231488e768b@oss.nttdata.com
Backpatch-through: 15

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/235c09efbb306d6263e904e484abdf44866beb5e

Modified Files
--------------
src/backend/utils/activity/pgstat.c | 3 +++
1 file changed, 3 insertions(+)



view thread (5+ messages)  latest in thread

Message-ID: <E1rVSDO-0047bN-G4@gemulon.postgresql.org>
Permalink:  ../E1rVSDO-0047bN-G4@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rVSDO-0047bN-G4@gemulon.postgresql.org

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: michael@paquier.xyz, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Fix stats_fetch_consistency with stats for fixed-numbered object
  In-Reply-To: <E1rVSDO-0047bN-G4@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