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

From: Aleksander Alekseev <aleksander(at)timescale(dot)com>
To: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Tomas Vondra <tomas(at)vondra(dot)me>
Subject: Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)
Date: 2025-06-17 14:10:04
Message-ID: CAJ7c6TO6RSf_0aWBkqVs6D3wZrmRsY-TMTN2AoCFGUYwj=2A0Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Ranier,

> To me this is a contradiction, whether you consider waiting for a segfault or consider adding an Assert.
> For the user it is better to have a log, where he can quickly find the problem, rather than having to investigate on his own.

That's the point. User's shouldn't encounter this. Thus there is no
reason to break branch prediction for everyone here.

I agree with Tomas that adding Assert() in fact will not change much.
It can serve as a little piece of documentation maybe: "yes we thought
about it", that's all.

--
Best regards,
Aleksander Alekseev

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-06-17 14:15:37 Re: Non-reproducible AIO failure
Previous Message Jelte Fennema-Nio 2025-06-17 14:05:45 Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx