pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Naylor <john.naylor@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Teach fasthash_accum to use platform endianness for bytewise loa
Date: Sat, 06 Apr 2024 10:17:15 +0000
Message-ID: <E1rt36p-000nMd-CB@gemulon.postgresql.org> (raw)

Teach fasthash_accum to use platform endianness for bytewise loads

This function previously used a mix of word-wise loads and bytewise
loads. The bytewise loads happened to be little-endian regardless of
platform. This in itself is not a problem. However, a future commit
will require the same result whether A) the input is loaded as a
word with the relevent bytes masked-off, or B) the input is loaded
one byte at a time.

While at it, improve debuggability of the internal hash state.

Discussion: https://postgr.es/m/CANWCAZZpuV1mES1mtSpAq8tWJewbrv4gEz6R_k4gzNG8GZ5gag%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0c25fee35903ef08af6d6b0c0fdb90fc01e37fa1

Modified Files
--------------
src/include/common/hashfn_unstable.h | 44 ++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 5 deletions(-)



Message-ID: <E1rt36p-000nMd-CB@gemulon.postgresql.org>
Permalink:  ../E1rt36p-000nMd-CB@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1rt36p-000nMd-CB@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: john.naylor@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Teach fasthash_accum to use platform endianness for bytewise loa
  In-Reply-To: <E1rt36p-000nMd-CB@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