Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends

Поиск
Список
Период
Сортировка
От John Naylor
Тема Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends
Дата
Msg-id CAFBsxsFjgx-YNEEbkUjOjkJ97ogfvwBrveOiV_+tavqhpk7wTA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends  (John Naylor <john.naylor@enterprisedb.com>)
Список pgsql-committers


On Mon, Feb 20, 2023 at 10:17 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> John Naylor <john.naylor@postgresql.org> writes:
> > Add assert checking to pg_leftmost_one_pos32() and friends
>
> I can see that this was worth writing for testing purposes, but
> is it really worth carrying permanently?  Even in a debug build,
> the ratio of cycles expended to chances of finding a problem seems
> mighty poor, and you've done a lot of damage to the readability
> of these functions too.

That's a fair point, and it's doubtful we'll need to add another platform anytime soon. I'll work on removing the asserts.

--
John Naylor
EDB: http://www.enterprisedb.com

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: pgsql: Detect overflow in timestamp[tz] subtraction.
Следующее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: pgbench: Prepare commands in pipelines in advance