pgsql: When a relation has been proven empty by constraint exclusion,

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: When a relation has been proven empty by constraint exclusion,
Date: 2008-03-24 21:53:04
Message-ID: 20080324215304.2E5587558DC@cvs.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
When a relation has been proven empty by constraint exclusion, propagate that
knowledge up through any joins it participates in. We were doing that already
in some special cases but not in the general case. Also, defend against zero
row estimates for the input relations in cost_mergejoin --- this fix may have
eliminated the only scenario in which that can happen, but be safe. Per
report from Alex Solovey.

Modified Files:
--------------
pgsql/src/backend/optimizer/path:
allpaths.c (r1.168 -> r1.169)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/allpaths.c?r1=1.168&r2=1.169)
costsize.c (r1.191 -> r1.192)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/costsize.c?r1=1.191&r2=1.192)
joinpath.c (r1.115 -> r1.116)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinpath.c?r1=1.115&r2=1.116)
joinrels.c (r1.91 -> r1.92)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/optimizer/path/joinrels.c?r1=1.91&r2=1.92)
pgsql/src/include/nodes:
relation.h (r1.154 -> r1.155)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/include/nodes/relation.h?r1=1.154&r2=1.155)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2008-03-24 21:53:12 pgsql: When a relation has been proven empty by constraint exclusion,
Previous Message Tom Lane 2008-03-24 19:47:35 pgsql: Use new errdetail_log() mechanism to provide a less klugy way of