Re: Use pg_nextpower2_* in a few more places

From: David Rowley <dgrowleyml(at)gmail(dot)com>
To: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Use pg_nextpower2_* in a few more places
Date: 2021-06-30 12:24:19
Message-ID: CAApHDvo2wieSC0CnUzjC1MkwOmd1sUm8Mxp-Jz8F4C2CXfsy6g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 13 Jun 2021 at 00:31, David Rowley <dgrowleyml(at)gmail(dot)com> wrote:
>
> Back in f0705bb62, we added pg_nextpower2_32 and pg_nextpower2_64 to
> efficiently obtain the next power of 2 of a given number using an
> intrinsic function to find the left-most 1 bit.
>
> In d025cf88b and 02a2e8b44, I added some usages of these new functions
> but I didn't quite get all of them done. The attached replaces all
> of the remaining ones that I'm happy enough to go near.

> I'd like to fix these for PG15.

I had another look over this patch and it looks ok to me. I plan to
push it in the next day or so.

David

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrey Borodin 2021-06-30 12:28:28 Re: Synchronous commit behavior during network outage
Previous Message Fujii Masao 2021-06-30 12:23:52 Re: postgres_fdw - should we tighten up batch_size, fetch_size options against non-numeric values?