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-20 13:34:37 |
Message-ID: | 1690704.1658324077@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 Wed, Jul 20, 2022 at 4:52 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I think we could probably just drop fls() entirely. It doesn't look
>> to me like any of the existing callers expect a zero argument, so they
>> could be converted to use pg_leftmost_one_pos32() pretty trivially.
> That was not true for the case in contiguous_pages_to_segment_bin(),
> in dsa.c. If it's just one place like that (and, hrrm, curiously
> there is an open issue about binning quality on my to do list...),
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.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2022-07-20 13:36:16 | Re: GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere. |
Previous Message | Alexander Korotkov | 2022-07-20 12:51:55 | Re: PATCH: Add Table Access Method option to pgbench |