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

From: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: John Naylor <john(dot)naylor(at)postgresql(dot)org>, pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends
Date: 2023-02-21 04:59:03
Message-ID: CAFBsxsFjgx-YNEEbkUjOjkJ97ogfvwBrveOiV_+tavqhpk7wTA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Mon, Feb 20, 2023 at 10:17 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> John Naylor <john(dot)naylor(at)postgresql(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2023-02-21 10:15:20 pgsql: pgbench: Prepare commands in pipelines in advance
Previous Message Tom Lane 2023-02-20 22:26:34 pgsql: Detect overflow in timestamp[tz] subtraction.