Re: amvalidate(): cache lookup failed for operator class 123

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Justin Pryzby <pryzby(at)telsasoft(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: amvalidate(): cache lookup failed for operator class 123
Date: 2021-05-13 20:49:46
Message-ID: 1639993.1620938986@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Thu, May 13, 2021 at 2:22 PM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2021-05-13 21:07:31 Re: Race condition in recovery?
Previous Message Peter Geoghegan 2021-05-13 20:27:44 Re: Teaching users how they can get the most out of HOT in Postgres 14