Adjust overly strict Assert
David Rowley <drowley@postgresql.org>
Adjust overly strict Assert 3373c7155 changed how we determine EquivalenceClasses for relations and added an Assert to ensure all relations mentioned in each EC's ec_relids was a RELOPT_BASEREL. However, the join removal code may remove a LEFT JOIN and since it does not clean up EC members belonging to the removed relations it can leave RELOPT_DEADREL rels in ec_relids. Fix this by adjusting the Assert to allow RELOPT_DEADREL rels too. Reported-by: sqlsmith via Andreas Seltenreich Discussion: https://postgr.es/m/87y30r8sls.fsf@ansel.ydns.eu
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/optimizer/path/equivclass.c | modified | +2 −1 |
Discussion
- Performance issue in foreign-key-aware join estimation 30 messages · 2018-12-20 → 2019-07-21