Re: PlaceHolderVars versus join ordering

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2010-09-28T01:27:27Z
Lists: pgsql-hackers

Attachments

Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Sep 27, 2010 at 1:15 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> This is a larger change than I would prefer to back-patch, but the only
>> less-invasive alternative I can see is to lobotomize the PlaceHolderVar
>> mechanism entirely by reverting to 8.3-style logic wherein we prevented
>> pullup of sub-selects that would require introduction of placeholders.
>> That would undo a significant optimization feature of 8.4, one that
>> I believe we're now relying on for reasonable performance of some system
>> views.
>> 
>> Thoughts, better ideas?

> Personally, I would rather back-patch a more invasive bug fix than a
> performance regression.

Yeah, me too.  Attached is a draft patch against HEAD --- comments?

			regards, tom lane