| From: | Dhruv Aron <dhruv(dot)aron(at)gmail(dot)com> |
|---|---|
| To: | Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Restructured Shared Buffer Hash Table |
| Date: | 2026-10-13 04:38:11 |
| Message-ID: | CAAStW3LzZeO48st2Dyr03Vkej2DMJS5WbEKpLZTNWYK-tovUaQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Oct 12, 2026 at 3:08 PM Alexandre Felipe <
o(dot)alexandre(dot)felipe(at)gmail(dot)com> wrote:
> 1.5 * num_bucket implicitly casts to floating point, and later back to
> integer, that was not meant to be permanent.
> A safer option would be (num_buckets | (num_buckets >> 1)), no wrap-around
> if some day
> this gets increased to UINT_MAX. Or simply num_buckets, without
> multiplication at all.
>
Apologies, I am experiencing trouble finding the line where we perform "1.5
* num_bucket"; perhaps it has been too long since I last worked on the
patch.
Could you point me towards where it is in the
restructured_shared_buffer_table.patch file?
Otherwise, yes, the bitwise arithmetic in this case should also be more
performant.
Best,
Dhruv
| From | Date | Subject | |
|---|---|---|---|
| Next Message | vignesh C | 2026-10-13 04:48:38 | Re: Test publication.sql racing with subscription.sql might fail due to cache lookup error |
| Previous Message | Tom Lane | 2026-10-13 04:34:35 | Re: [PG19] Stale state after the join removal restart gives wrong results |