From: | Noah Misch <noah(at)leadboat(dot)com> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Avoid repeating loads of frozen ID values. |
Date: | 2024-04-29 17:30:40 |
Message-ID: | E1s1Upr-000eAB-TW@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Noah Misch | 2024-04-29 17:30:41 | pgsql: Close race condition between datfrozen and relfrozen updates. |
Previous Message | Heikki Linnakangas | 2024-04-29 15:14:26 | pgsql: libpq: Fix error messages when server rejects SSL or GSS |