From: Tom Lane <tgl@sss.pgh.pa.us>
To: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
Date: Sun, 09 Oct 2022 17:08:39 -0400
Message-ID: <3943009.1665349719@sss.pgh.pa.us> (raw)
In-Reply-To: <20221009210148.GA900071@nathanxps13>
References: <3928703.1665345117@sss.pgh.pa.us>
<20221009210148.GA900071@nathanxps13>
Nathan Bossart <nathandbossart@gmail.com> writes:
> On Sun, Oct 09, 2022 at 03:51:57PM -0400, Tom Lane wrote:
>> Hence, I propose the attached.
> The patch LGTM. It might be worth removing usages of AssertArg and
> AssertState, too, but that can always be done separately.
Something I thought about but forgot to mention in the initial email:
is it worth sprinkling these macros with "unlikely()"? I think that
compilers might assume the right thing automatically based on noticing
that ExceptionalCondition is noreturn ... but then again they might
not. Of course we're not that fussed about micro-optimizations in
assert-enabled builds; but with so many Asserts in the system, it
might still add up to something noticeable if there is an effect.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: tgl@sss.pgh.pa.us, nathandbossart@gmail.com, pgsql-hackers@lists.postgresql.org
Subject: Re: Simplifying our Trap/Assert infrastructure
In-Reply-To: <3943009.1665349719@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox