Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c) - Mailing list pgsql-hackers

From Aleksander Alekseev
Subject Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)
Date
Msg-id CAJ7c6TO6RSf_0aWBkqVs6D3wZrmRsY-TMTN2AoCFGUYwj=2A0Q@mail.gmail.com
Whole thread Raw
In response to Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)
List 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
hisown.
 

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



pgsql-hackers by date:

Previous
From: Jelte Fennema-Nio
Date:
Subject: Re: [PATCH] Add additional extended protocol commands to psql: \parse and \bindx
Next
From: Tom Lane
Date:
Subject: Re: Non-reproducible AIO failure