Re: Early WIP/PoC for inlining CTEs - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Early WIP/PoC for inlining CTEs
Date
Msg-id CAHyXU0zVzBBeW+xpKLxWWwYD5pyK2+KwpM26JM=eZ58hfYOf4g@mail.gmail.com
Whole thread Raw
In response to Re: Early WIP/PoC for inlining CTEs  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On Tue, Jul 24, 2018 at 6:10 PM Andres Freund <andres@anarazel.de> wrote:
> My read of the concensus (in which I am in the majority, so I might be
> biased) is that we do want inlining to be the default. We were thinking
> that it'd be necessary to provide a way to force inlining on the SQL
> level for individual CTEs.

This is correct.  Suggesting that we need syntax to disabling inlining
at the CTE level, and/or GUC to control the behavior (which I agree
should be defualted to inline).  Something like
enable_cte_inline=true; I'm not very enthusiastic about explicitly
breaking intentionally introduced optimization fences and then forcing
people to inject our OFFSET 0 hack.   This is just too unpleasant to
contemplate...what  happens if we come up with a better implemntation
of OFFSET?  yuck.

Thanks for providing this, CTE plan problems are a real bugaboo.

merlin


pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [HACKERS] PATCH: multivariate histograms and MCV lists
Next
From: Tom Lane
Date:
Subject: Re: Three animals fail test-decoding-check on REL_10_STABLE