Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)
Дата
Msg-id 158F1477-700B-4C05-954B-78FE5A4BA759@yesql.se
обсуждение исходный текст
Ответ на Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)  (Tomas Vondra <tomas@vondra.me>)
Список pgsql-hackers
> On 17 Jun 2025, at 15:43, Tomas Vondra <tomas@vondra.me> wrote:

> .. if we
> get a failure here, it's not clear to me we can really keep the system
> running anyway. It's not just the usual "relcache miss" and if the user
> retries it will probably work fine. The catalog is borked, and who knows
> in what way.

Agreed.

> My opinion is that adding a "elog(ERROR)" here would be misleading, as
> it implies it's something we expect. And mostly pointless. I can imagine
> adding an Assert, but I don't quite see how is that better than just
> hitting a segfault a couple lines later.

If I break something here while hacking I'd probably prefer a segfault to an
Assert.

--
Daniel Gustafsson




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