On Sun, 23 May 2021 at 09:09, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> PG Bug reporting form <noreply@postgresql.org> writes:
> > When testing our application I suddenly got the $subject error message:
> > ERROR: cannot decompile join alias var in plan tree
>
> That's surely a bug, but there's little we can do about it without
> a self-contained test case.
It fails for me with a fresh database with:
explain select * from pg_attribute a where attname not in(select
column_name from information_schema.columns);
I suspect Result Cache is to blame here and that I've done something
wrong in setrefs.c.
I can look into this a bit more in the morning. It's not a good time
of day right now to debug setrefs.c
David