Re: [HACKERS] CTE inlining

2017-04-29 Thread Craig Ringer
On 30 Apr. 2017 13:28, "Andres Freund" wrote: On 2017-04-30 00:28:46 -0400, Tom Lane wrote: > There's already a pretty large hill to climb here in the way of > breaking peoples' expectations about CTEs being optimization > fences. Breaking the documented semantics about CTEs being > single-evalu

Re: [HACKERS] CTE inlining

2017-04-29 Thread Andres Freund
On 2017-04-30 00:28:46 -0400, Tom Lane wrote: > There's already a pretty large hill to climb here in the way of > breaking peoples' expectations about CTEs being optimization > fences. Breaking the documented semantics about CTEs being > single-evaluation seems to me to be an absolute non-starter.

Re: [HACKERS] CTE inlining

2017-04-29 Thread Pavel Stehule
2017-04-30 6:28 GMT+02:00 Tom Lane : > Craig Ringer writes: > > - as you noted, it is hard to decide when it's worth inlining vs > > materializing for CTE terms referenced more than once. > > [ raised eyebrow... ] Please explain why the answer isn't trivially > "never". > > There's already a pre

Re: [HACKERS] CTE inlining

2017-04-29 Thread Tom Lane
Craig Ringer writes: > - as you noted, it is hard to decide when it's worth inlining vs > materializing for CTE terms referenced more than once. [ raised eyebrow... ] Please explain why the answer isn't trivially "never". There's already a pretty large hill to climb here in the way of breaking

Re: [HACKERS] CTE inlining

2017-04-29 Thread Craig Ringer
On 30 Apr. 2017 07:56, "Ilya Shkuratov" wrote: Hello, dear hackers! There is task in todo list about optional CTE optimization fence disabling. I am not interested at this point in disabling mechanism implementation, but I would like to discuss the optimization mechanism, that should work when

<    1   2