Re: Remove fls(), use pg_bitutils.h facilities instead?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, David Rowley <dgrowleyml(at)gmail(dot)com>
Subject: Re: Remove fls(), use pg_bitutils.h facilities instead?
Date: 2022-07-21 13:46:05
Message-ID: 2248192.1658411165@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thomas Munro <thomas(dot)munro(at)gmail(dot)com> writes:
> On Thu, Jul 21, 2022 at 1:34 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> How is it sane to ask for a segment bin for zero pages? Seems like
>> something should have short-circuited such a case well before here.

> It's intended. There are two ways you can arrive here with n == 0:

OK.

>> We could have pg_bitutils.h #define pg_leftmost_one_pos_size_t
>> as the appropriate one of pg_leftmost_one_pos32/64, perhaps.

> Yeah.

Patches look good to me.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2022-07-21 13:47:21 Re: [PATCH v1] eliminate duplicate code in table.c
Previous Message Yura Sokolov 2022-07-21 13:23:11 Re: SLRUs in the main buffer pool, redux