Re: AssertLog instead of Assert in some places

Поиск
Список
Период
Сортировка
От Peter Geoghegan
Тема Re: AssertLog instead of Assert in some places
Дата
Msg-id CAH2-WzkQgj65N501TigpUWfdLFWOL7ZKLcpSV-1djs1Kwvs2wA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: AssertLog instead of Assert in some places  (Andres Freund <andres@anarazel.de>)
Ответы Re: AssertLog instead of Assert in some places  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
On Fri, Aug 11, 2023 at 10:57 AM Andres Freund <andres@anarazel.de> wrote:
> I am quite strongly against this. This will lead to assertions being hit in
> tests without that being noticed, e.g. because they happen in a background
> process that just restarts.

Couldn't you say the same thing about defensive "can't happen" ERRORs?
They are essentially a form of assertion that isn't limited to
assert-enabled builds.

I have sometimes thought that it would be handy if there was a variant
of "can't happen" ERRORs that took on the structure of an assertion.
(This is quite different to what Ashutosh has proposed, though, since
it would still look like a conventional assertion failure on
assert-enabled builds.)

--
Peter Geoghegan



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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: [PATCH] Support static linking against LLVM
Следующее
От: Andres Freund
Дата:
Сообщение: Re: AssertLog instead of Assert in some places