| From: | Alexandre Felipe <o(dot)alexandre(dot)felipe(at)gmail(dot)com> |
|---|---|
| To: | Dhruv Aron <dhruv(dot)aron(at)gmail(dot)com> |
| Cc: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | Re: Restructured Shared Buffer Hash Table |
| Date: | 2026-10-13 05:02:15 |
| Message-ID: | CAE8JnxNrJKTqkVDw_3hrLmnDhhQ_xo-SLTPAx0Vhbpt4QsAhpQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Oct 13, 2026 at 5:38 AM Dhruv Aron <dhruv(dot)aron(at)gmail(dot)com> wrote:
> 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.
>
It was a modification that I did
https://www.postgresql.org/message-id/CAE8JnxPMMfdnWWQO18gHwEmkmdCu9KwuqbWRb6DkfKQ-H%2Bm_PA%40mail.gmail.com
If you are working from your original patch my comment doesn't apply.
Regards,
Alexandre
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Henson Choi | 2026-10-13 05:03:44 | [DEPARSE] Pretty-printed sublink test expressions lose needed parentheses |
| Previous Message | shihao zhong | 2026-10-13 04:56:17 | Re: [PG19] pg_dump --statistics restores extended statistics by attribute number |