Re: amvalidate(): cache lookup failed for operator class 123 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: amvalidate(): cache lookup failed for operator class 123
Date
Msg-id 1639993.1620938986@sss.pgh.pa.us
Whole thread Raw
In response to Re: amvalidate(): cache lookup failed for operator class 123  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: amvalidate(): cache lookup failed for operator class 123
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Thu, May 13, 2021 at 2:22 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Meh.  I'm not convinced that that position ought to apply to amvalidate.

> I am still of the opinion that we ought to apply it across the board,
> for consistency.

The main reason I'm concerned about applying that rule to amvalidate
is that then how do you know what's actually an error case?

As a hardly-irrelevant counterexample, we have a whole bunch of
regression tests that do something like

SELECT ...
WHERE NOT amvalidate(oid);

Every one of those is silently and dangerously wrong if amvalidate
might sometimes return null.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: Teaching users how they can get the most out of HOT in Postgres 14
Next
From: Robert Haas
Date:
Subject: Re: Race condition in recovery?