aboutsummaryrefslogtreecommitdiff
path: root/src/backend/commands
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2023-06-15 15:24:50 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2023-06-15 15:24:50 -0400
commitf4c00d138f6dea4c9d8af8ec280b7edc9b0a29e1 (patch)
tree81c0e59801ff905e19dbe93623ff71a16fdd02fd /src/backend/commands
parent5c8c8079b0f93bb714b14e4ce9b463411cad7db4 (diff)
downloadpostgresql-f4c00d138f6dea4c9d8af8ec280b7edc9b0a29e1.tar.gz
postgresql-f4c00d138f6dea4c9d8af8ec280b7edc9b0a29e1.zip
When removing a left join, clean out references in EquivalenceClasses.
Since commit b448f1c8d, we've been able to remove left joins (that are otherwise removable) even when they are underneath other left joins, a case that was previously prevented by a delay_upper_joins check. This is a clear improvement, but it has a surprising side-effect: it's now possible that there are EquivalenceClasses whose relid sets mention the removed baserel and/or outer join. If we fail to clean those up, we may drop essential join quals due to not having any join level that appears to satisfy their relid sets. (It's not quite 100% clear that this was impossible before. But the lack of complaints since we added join removal a dozen years ago strongly suggests that it was impossible.) Richard Guo and Tom Lane, per bug #17976 from Zuming Jiang Discussion: https://postgr.es/m/17976-4b638b525e9a983b@postgresql.org
Diffstat (limited to 'src/backend/commands')
0 files changed, 0 insertions, 0 deletions