On Tue, Oct 13, 2026 at 5:38 AM Dhruv Aron <[email protected]> wrote:
> On Mon, Oct 12, 2026 at 3:08 PM Alexandre Felipe < > [email protected]> 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
