On Tue, Apr 21, 2026 at 7:40 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Ah: equivclass.c doesn't mind letting em->em_relids be an alias > for the left_relids or right_relids of some source RestrictInfo. > That's not problematic as long as those are all constants after > construction of the EquivalenceClass, but when remove_rel_from_eclass > is trying to change things, it's a big problem.
ha, I just came to the same conclusion.
> This seems to do the trick to fix it, although I'm going to wait > for a valgrind regression run to finish before deciding this > is enough: