model-writtenrun 5627 - may be wrong, links go to the source messages. Commit-by-commit LLM analysis is in the Commits dialog.
- Matthias van de Meent proposed fixed-offset access to index-page special areas to remove page-header dependencies and limit damage from corrupted pd_special values, alongside typed hash/btree accessor macros for consistency with other index methods #1.
- Michael Paquier questioned the corruption and performance arguments, raised an MSVC concern, and requested a parameter-name correction; Matthias supplied a lightly revised series and explained why the existing MSVC issue should not apply #2 #3.
- Michael separated the broadly useful hash/btree accessor cleanup from the fixed-offset optimization, keeping PageGetSpecialPointer and preferring any additional assertions to live in AM-specific headers #4.
- Michael committed that extracted cleanup as d16773cdc8, matching #4 apart from whitespace and crediting Matthias as author; the fixed-offset helper and additional assertions were not included.
- Michael then supplied an incremental patch adding size assertions to all five AM accessors, but Matthias objected that it preserved both the header dependency and the non-assert-build corruption scenario #6 #7.
- Matthias resent the remaining fixed-offset optimization against the committed accessor cleanup and offered register-use and binary-size observations in support, without presenting a measured runtime speedup #8.
- Robert Haas warned that fixed offsets could conflict with future per-page encryption nonces; Matthias argued that the optimization could be reversed later, while Robert defended initdb-time layout choices for encryption and stronger integrity checks #9 #10 #12.
- Pavel Borisov noted that proposed 64-bit transaction IDs could also consume heap special space, and Peter Geoghegan suggested arranging extra metadata before the AM-specific opaque structure to preserve fixed-offset access #11 #13 #15.
- Robert argued that nonce placement must be discoverable before decryption and cannot always depend on knowing the AM type; Stephen Frost supported configurable space reservations and questioned reliable AM identification for extension-defined methods, leaving Peter's alternative unadopted #14 #16 #18 #19 #20.
- Matthias proposed reusing the on-disk LSN field for a nonce to avoid changing AM-controlled space, while Bruce Momjian questioned the nonce requirement because XTS does not need one; neither discussion produced another attached patch #21 #22.
- After several months, Tom Lane recommended rejecting the remaining optimization because it sacrificed page-layout flexibility without demonstrated performance gains, and Michael agreed that replacing header-based access was unappealing #23 #24.
- The thread ended with only the hash/btree accessor cleanup landed: Michael revisited the assertion-only alternative, but Tom discouraged redundant accessor checks and favored page-read-time validation such as _bt_checkpage #24 #25.