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 CAJ7c6TOT+ccb2uuKypM5z=OPPgW07cAFzuq1EsSZb1qcpUfeHQ@mail.gmail.com
Whole thread Raw
In response to Avoid possible dereference null pointer (src/backend/utils/cache/relcache.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
Hi,

> The function *ScanPgRelation* can return a invalid tuple.
> It is necessary to check the function's return,
> as is already done in other parts of the source.

Good find although I'm not certain if I agree with the patch.

We would be in serious trouble if RelationReloadNailed() could be
called for a non-existing relation. Wouldn't Assert() be more
appropriate?

-- 
Best regards,
Aleksander Alekseev



pgsql-hackers by date:

Previous
From: D Laaren
Date:
Subject: Re: Timeline switching with partial WAL records can break replica recovery
Next
From: Tatsuo Ishii
Date:
Subject: Re: BackendKeyData is mandatory?