| From: | John Naylor <johncnaylorls(at)gmail(dot)com> |
|---|---|
| To: | Aleksander Alekseev <aleksander(at)tigerdata(dot)com> |
| Cc: | PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: [PATCH] Refactor *_abbrev_convert() functions |
| Date: | 2026-07-02 07:27:25 |
| Message-ID: | CANWCAZZ9wbVGdzwgUOWvGrnAZcC2y4+8w=h0ZzuigadxWPtzQw@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Feb 24, 2026 at 9:58 PM Aleksander Alekseev
<aleksander(at)tigerdata(dot)com> wrote:
> > For the first, we should probably combine in the upper half when using
> > a 64-bit hash, like this:
>
> We could do it if you insist but I'm convinced this is redundant. In a
> good hash upper 32 bits are as evenly distributed as lower ones so
> this combining doesn't buy us much.
Sure, let's keep it simple.
0001:
- 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_any((const unsigned char *) k->channel,
+ strnlen(k->channel, NAMEDATALEN));
This seems like it belongs in 0002.
Also, when a hunk is changed to a single line, we should remove the
parens. I see three like this.
0002 LGTM.
--
John Naylor
Amazon Web Services
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Akshay Joshi | 2026-07-02 07:48:51 | Re: [PATCH] Add pg_get_table_ddl() to reconstruct CREATE TABLE statements |
| Previous Message | Peter Eisentraut | 2026-07-02 07:25:33 | Re: [PATCH] Fix null pointer dereference in PG19 |