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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: John Naylor <john(dot)naylor(at)postgresql(dot)org>
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add assert checking to pg_leftmost_one_pos32() and friends
Date: 2023-02-20 15:17:41
Message-ID: 3567481.1676906261@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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.

Maybe we could condition the duplicate computation on some
additional not-commonly-defined macro? That'd do little for the
readability issue though.

regards, tom lane

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2023-02-20 17:06:42 pgsql: Remove gratuitous assumptions about what make_modifytable can se
Previous Message Alvaro Herrera 2023-02-20 15:15:20 pgsql: Correctly set userid of subquery relations' child rels