Re: [PATCH] Check more invariants during syscache initialization - Mailing list pgsql-hackers

From Michael Paquier
Subject Re: [PATCH] Check more invariants during syscache initialization
Date
Msg-id ZMHPAAx5mgx/pnlT@paquier.xyz
Whole thread Raw
In response to Re: [PATCH] Check more invariants during syscache initialization  (Aleksander Alekseev <aleksander@timescale.com>)
List pgsql-hackers
On Wed, Jul 26, 2023 at 07:01:11PM +0300, Aleksander Alekseev wrote:
> Hi,
>
> > Shouldn't these be calling `OidIsValid(…)`, not comparing directly to
> > `InvalidOid`?
>
> They should, thanks. Here is the updated patch. I made sure there are
> no others != InvalidOid checks in syscache.c and catcache.c which are
> affected by my patch. I didn't change any other files since Zhang
> wants to propose the corresponding patch.

While arguing about OidIsValid() for the relation OID part, I found a
bit surprising that you did not consider AttributeNumberIsValid() for
the new check on the keys.  I've switched the second check to that,
and applied v3.
--
Michael

Attachment

pgsql-hackers by date:

Previous
From: Zhang Mingli
Date:
Subject: Re: [PATCH] Check more invariants during syscache initialization
Next
From: Kyotaro Horiguchi
Date:
Subject: Re: pg_usleep for multisecond delays