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

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Remove fls(), use pg_bitutils.h facilities instead?
Дата
Msg-id CAApHDvrWZTD+ONUO8smvXebFTvQd-fqRuh6wpWuXL-jDsMSVJw@mail.gmail.com
обсуждение исходный текст
Ответ на Remove fls(), use pg_bitutils.h facilities instead?  (Thomas Munro <thomas.munro@gmail.com>)
Список pgsql-hackers
On Wed, 20 Jul 2022 at 16:21, Thomas Munro <thomas.munro@gmail.com> wrote:
> Back in commit 4f658dc8 we gained src/port/fls.c.  As anticipated by
> its commit message, we later finished up with something better in
> src/include/port/pg_bitutils.h.  fls() ("find last set") is an
> off-by-one cousin of pg_leftmost_one_pos32().

Seems like a good idea to me.

One thing I noticed was that pg_leftmost_one_pos32() expects a uint32
but the new function passes it an int. Is it worth mentioning that's
ok in a comment somewhere or maybe adding an explicit cast?

David



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bharath Rupireddy
Дата:
Сообщение: Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages
Следующее
От: Thomas Munro
Дата:
Сообщение: Re: Windows now has fdatasync()