Simplify hash_xlog_split_allocate_page()
Peter Eisentraut <peter@eisentraut.org>
Author:
Peter Eisentraut <peter@eisentraut.org>
Date: 2025-12-02T08:18:54Z
Releases:
19 (unreleased)
Simplify hash_xlog_split_allocate_page() Instead of complicated pointer arithmetic, overlay a uint32 array and just access the array members. That's safe thanks to XLogRecGetBlockData() returning a MAXALIGNed buffer. Reviewed-by: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com> Discussion: https://www.postgresql.org/message-id/flat/aSQy2JawavlVlEB0%40ip-10-97-1-34.eu-west-3.compute.internal
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/hash/hash_xlog.c | modified | +17 −18 |
Discussion
- Remove useless casting to the same type 16 messages · 2025-11-24 → 2025-12-02