Re: Simplifying our Trap/Assert infrastructure

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Simplifying our Trap/Assert infrastructure
Дата
Msg-id 3943009.1665349719@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Simplifying our Trap/Assert infrastructure  (Nathan Bossart <nathandbossart@gmail.com>)
Ответы Re: Simplifying our Trap/Assert infrastructure  (Nathan Bossart <nathandbossart@gmail.com>)
Список pgsql-hackers
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



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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Re: Simplifying our Trap/Assert infrastructure
Следующее
От: Nathan Bossart
Дата:
Сообщение: Re: use has_privs_of_role() for pg_hba.conf