Re: [HACKERS] CTE inlining - Mailing list pgsql-hackers

From David Rowley
Subject Re: [HACKERS] CTE inlining
Date
Msg-id CAKJS1f-zcdda_6Rskry8cwaVmrmdPg1XBAE40-5+fWHjnwmK=g@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] CTE inlining  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [HACKERS] CTE inlining  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
List pgsql-hackers
On 5 May 2017 at 14:04, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Craig Ringer <craig.ringer@2ndquadrant.com> writes:
>> We're carefully maintaining this bizarre cognitive dissonance where we
>> justify the need for using this as a planner hint at the same time as
>> denying that we have a hint. That makes it hard to make progress here.
>> I think there's fear that we're setting some kind of precedent by
>> admitting what we already have.
>
> I think you're overstating the case.  It's clear that there's a
> significant subset of CTE functionality where there has to be an
> optimization fence.  The initial implementation basically took the
> easy way out by deeming *all* CTEs to be optimization fences.  Maybe
> we shouldn't have documented that behavior, but we did.  Now we're
> arguing about how much of a compatibility break it'd be to change that
> planner behavior.  I don't see any particular cognitive dissonance here,
> just disagreements about the extent to which backwards compatibility is
> more important than better query optimization.

How about we get the ball rolling on this in v10 and pull that part
out of the docs. If anything that'll buy us a bit more wiggle room to
change this in v11.

I've attached a proposed patch.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachment

pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [HACKERS] password_encryption, default and 'plain' support
Next
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Patch - Tcl 8.6 version support for PostgreSQL