Avoid repeating loads of frozen ID values.
Noah Misch <noah@leadboat.com>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/heap/heapam.c | modified | +10 −6 |
| src/backend/commands/cluster.c | modified | +14 −8 |
| src/backend/commands/vacuum.c | modified | +2 −2 |
| src/backend/postmaster/autovacuum.c | modified | +8 −5 |
Discussion
- Autovacuum to prevent wraparound tries to consume xid 6 messages · 2016-03-28 → 2024-04-23