pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Avoid repeating loads of frozen ID values.
Date: Mon, 29 Apr 2024 17:30:40 +0000
Message-ID: <E1s1Upr-000eAB-TW@gemulon.postgresql.org> (raw)

Avoid repeating loads of frozen ID values.

Repeating loads of inplace-updated fields tends to cause bugs like the
one from the previous commit.  While there's no bug to fix in these code
sites, adopt the load-once style.  This improves the chance of future
copy/paste finding the safe style.

Discussion: https://postgr.es/m/20240423003956.e7.nmisch@google.com

Branch
------
master

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

Modified Files
--------------
src/backend/access/heap/heapam.c    | 16 ++++++++++------
src/backend/commands/cluster.c      | 22 ++++++++++++++--------
src/backend/commands/vacuum.c       |  4 ++--
src/backend/postmaster/autovacuum.c | 13 ++++++++-----
4 files changed, 34 insertions(+), 21 deletions(-)



view thread (2+ messages)

Message-ID: <E1s1Upr-000eAB-TW@gemulon.postgresql.org>
Permalink:  ../E1s1Upr-000eAB-TW@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1s1Upr-000eAB-TW@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: noah@leadboat.com, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Avoid repeating loads of frozen ID values.
  In-Reply-To: <E1s1Upr-000eAB-TW@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