Re: [PATCH] Refactor *_abbrev_convert() functions - Mailing list pgsql-hackers

From John Naylor
Subject Re: [PATCH] Refactor *_abbrev_convert() functions
Date
Msg-id CANWCAZYeZmvovQNNXPfQsp6P=p4__MWEHrK3Yp5f0E=c_qb+3w@mail.gmail.com
Whole thread
In response to Re: [PATCH] Refactor *_abbrev_convert() functions  (Zsolt Parragi <zsolt.parragi@percona.com>)
Responses Re: [PATCH] Refactor *_abbrev_convert() functions
List pgsql-hackers
On Wed, Sep 23, 2026 at 3:50 PM Zsolt Parragi <zsolt.parragi@percona.com> wrote:
>
> Hello
>
> -       h = DatumGetUInt32(hash_uint32(k->dboid));
> -       h ^= DatumGetUInt32(hash_any((const unsigned char *) k->channel,
> -                                                                strnlen(k->channel, NAMEDATALEN)));
> +       h = murmurhash32(k->dboid);
> +       h ^= hash_bytes((const unsigned char *) k->channel,
> +                                       strnlen(k->channel, NAMEDATALEN));
>
> I see that this change was discussed previously, but shouldn't it be
> at least mentioned in the commit message?

I'm thinking now to leave the change to hash_uint32 out now, since
there are places elsewhere that do round-trip casting via hash_uint32,
and that could be material a separate patch, leaving this patch only
touching hash_any. I'll make the change my self and commit soon.

--
John Naylor
Amazon Web Services



pgsql-hackers by date:

Previous
From: Karina Litskevich
Date:
Subject: Re: Vacuum statistics
Next
From: Peter Eisentraut
Date:
Subject: Re: Fix conversion warnings in headers