Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Neil Chen <carpenter(dot)nail(dot)cz(at)gmail(dot)com>, Alexander Law <exclusion(at)gmail(dot)com>, PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, Paul A Jungwirth <pj(at)illuminatedcomputing(dot)com>
Subject: Re: BUG #17066: Cache lookup failed when null (unknown) is passed as anycompatiblemultirange
Date: 2021-07-21 10:25:39
Message-ID: CAPpHfdtgd42dTehaiPqqP7v978oGSFHjLo_3=D_=UWzFTSwOrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Jul 21, 2021 at 12:54 AM Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Alexander Korotkov <aekorotkov(at)gmail(dot)com> writes:
> > Do I understand correctly that enforce_generic_type_consistency() is
> > called only after check_generic_type_consistency() returned true?
> > If so, that means some of the checks are redundant. Therefore, we can
> > replace ereport()'s with Assert()'s.
>
> They are not redundant, IIRC. I forget the exact mechanism for
> reaching them, but it likely has something to do with aggregates
> or variadic functions.

If checks aren't redundant, there should be cases when they don't
pass. It would be nice to identify these cases and add them to the
regression tests. I didn't manage to do this yet.

> In any case, apologies for taking so long to get back to this. Here's
> a proposed patch (based in part on Neil's earlier patch).

Thank you! I'll review this and come back to you.

------
Regards,
Alexander Korotkov

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pawel Kudzia 2021-07-21 10:49:57 Re: IRe: BUG #16792: silent corruption of GIN index resulting in SELECTs returning non-matching rows
Previous Message Palle Girgensohn 2021-07-21 09:31:11 Re: BUG #16696: Backend crash in llvmjit