pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify hash_xlog_split_allocate_page()
Date: Tue, 02 Dec 2025 08:25:46 +0000
Message-ID: <E1vQLhh-002Opj-1z@gemulon.postgresql.org> (raw)

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.intern...

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/35988b31db7767ba446009611b9928add1d40f98

Modified Files
--------------
src/backend/access/hash/hash_xlog.c | 35 +++++++++++++++++------------------
1 file changed, 17 insertions(+), 18 deletions(-)



Message-ID: <E1vQLhh-002Opj-1z@gemulon.postgresql.org>
Permalink:  ../E1vQLhh-002Opj-1z@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1vQLhh-002Opj-1z@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: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Simplify hash_xlog_split_allocate_page()
  In-Reply-To: <E1vQLhh-002Opj-1z@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