Re: [PATCH] Check more invariants during syscache initialization

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Zhang Mingli <zmlpostgres@gmail.com>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Michael Paquier <michael@paquier.xyz>
Date: 2023-07-26T16:01:11Z
Lists: pgsql-hackers

Attachments

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.

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Add sanity asserts for index OID and attnums during cache init