Re: Pseudoconstant quals versus the join removal patch

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Pseudoconstant quals versus the join removal patch
Date: 2010-09-15 02:14:11
Message-ID: AANLkTikijAH5T_W+jFrxOCSNyZ0bTsB8fbY3tFx=SC6Z@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Sep 14, 2010 at 8:44 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Tue, Sep 14, 2010 at 7:26 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I wrote:
>>> I think that it's probably sufficient to make remove_rel_from_query run
>>> through the rel's joininfo list looking for pseudoconstant quals, and
>>> push those back into the joininfo lists with a reduced join list.  I
>>> wonder though if there's a better way, or if there are related bugs
>>> this fix won't cover.  Any thoughts?
>>
>> On reflection I decided that outerjoin-delayed quals could probably have
>> the same problem.  I've changed the code so that all quals not clearly
>> attached to the specific outer join we're removing will be modified to
>> ensure they're still evaluated at the right time.
>
> Thanks for jumping on this.  FTR, I don't read pgsql-sql.

One other thought: should we add some of these queries that have
exposed bugs in join removal to the regression tests?

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-09-15 02:27:34 elog during holding a spinlock is safe?
Previous Message Robert Haas 2010-09-15 01:44:29 Re: bg worker: patch 1 of 6 - permanent process