Re: BUG #19460: FULL JOIN rewriting issue on empty queries
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@lists.postgresql.org, francois.jehl@pigment.com, Robert Haas <robertmhaas@gmail.com>
Date: 2026-04-20T23:04:29Z
Lists: pgsql-bugs
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: This seems safe enough to me. LGTM. - Richard
Commits
-
Fix relid-set clobber during join removal.
- f0ac6d494b56 19 (unreleased) landed
- 798dabe83887 16.14 landed
- 53cb4ec1ded7 17.10 landed
-
Clean up all relid fields of RestrictInfos during join removal.
- d509be4ace90 16.14 landed
- cfcd5711160a 19 (unreleased) landed
- 766d40286600 17.10 landed
- 16fb94605c8f 18.4 landed