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 incorrect comment in pgstat_backend.c
Date: Wed, 03 Sep 2025 23:35:12 +0000
Message-ID: <E1utx0S-000NcY-2E@gemulon.postgresql.org> (raw)

Fix incorrect comment in pgstat_backend.c

The counters saved from pgWalUsage, used for the difference calculations
when flushing the backend WAL stats, are updated when calling
pgstat_flush_backend() under PGSTAT_BACKEND_FLUSH_WAL, and not
pgstat_report_wal().  The comment updated in this commit referenced the
latter, but it is perfectly OK to flush the backend stats independently
of the WAL stats.

Noticed while looking at this area of the code, introduced by
76def4cdd7c2 as a copy-pasto.

Backpatch-through: 18

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/c91c61b2417d0c36993deff03f09b1f64c821a1b

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



view thread (2+ messages)  latest in thread

Message-ID: <E1utx0S-000NcY-2E@gemulon.postgresql.org>
Permalink:  ../E1utx0S-000NcY-2E@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1utx0S-000NcY-2E@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 incorrect comment in pgstat_backend.c
  In-Reply-To: <E1utx0S-000NcY-2E@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