pgsql: Adjust overly strict Assert

From: David Rowley <drowley(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Adjust overly strict Assert
Date: 2019-07-21 22:30:13
Message-ID: E1hpKLN-0006ke-EG@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e1a0f6a983068675813074847e1d0d61bd37ac0e

Modified Files
--------------
src/backend/optimizer/path/equivclass.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2019-07-22 01:05:03 pgsql: Fix inconsistencies and typos in the tree
Previous Message Tom Lane 2019-07-21 15:42:16 pgsql: Remove no-longer-helpful reliance on fixed-size local array.