pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Reduce the scope of volatile qualifiers
Date: Tue, 03 Mar 2026 09:08:42 +0000
Message-ID: <E1vxLkA-0028qf-0f@gemulon.postgresql.org> (raw)

Reduce the scope of volatile qualifiers

Commit c66a7d75e652 introduced a new "cast discards ‘volatile’"
warning (-Wcast-qual) in vac_truncate_clog().

Instead of making use of unvolatize(), remove the warning by reducing the
scope of the volatile qualifier (added in commit 2d2e40e3bef) to only
2 fields.

Also do the same for vac_update_datfrozenxid(), since the intent of
commit f65ab862e3b was to prevent the same kind of race condition that
commit 2d2e40e3bef was fixing.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Suggested-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/aZ3a%2BV82uSfEjDmD%40ip-10-97-1-34.eu-west-3.compute.inte...

Branch
------
master

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

Modified Files
--------------
src/backend/commands/vacuum.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)



Message-ID: <E1vxLkA-0028qf-0f@gemulon.postgresql.org>
Permalink:  ../E1vxLkA-0028qf-0f@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vxLkA-0028qf-0f@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Reduce the scope of volatile qualifiers
  In-Reply-To: <E1vxLkA-0028qf-0f@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