Reduce the scope of volatile qualifiers
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2026-03-03T09:02:28Z
Releases:
19 (unreleased)
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.internal
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/vacuum.c | modified | +10 −6 |
Discussion
- Make use of unvolatize() in vac_truncate_clog() 6 messages · 2026-02-24 → 2026-03-03