Re: [HACKERS] parallel "return query" is no good

2017-03-24 Thread Robert Haas
On Thu, Mar 23, 2017 at 1:53 PM, Alvaro Herrera wrote: > Robert Haas wrote: >> I guess the downside of back-patching this is that it could cause a >> plan change for somebody which ends up being worse. On the whole, >> serial execution of queries intended to be run in

Re: [HACKERS] parallel "return query" is no good

2017-03-23 Thread Alvaro Herrera
Robert Haas wrote: > I guess the downside of back-patching this is that it could cause a > plan change for somebody which ends up being worse. On the whole, > serial execution of queries intended to be run in parallel isn't > likely to work out well, but it's always possible somebody has a cases

Re: [HACKERS] parallel "return query" is no good

2017-03-23 Thread Joshua D. Drake
On 03/23/2017 10:03 AM, Robert Haas wrote: On Thu, Mar 23, 2017 at 12:50 PM, Robert Haas wrote: Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b allowed a parallel plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE statement in a PL/pgsql block. As it

Re: [HACKERS] parallel "return query" is no good

2017-03-23 Thread Andres Freund
On 2017-03-23 13:03:19 -0400, Robert Haas wrote: > On Thu, Mar 23, 2017 at 12:50 PM, Robert Haas wrote: > > Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b allowed a parallel > > plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE > > statement in a

Re: [HACKERS] parallel "return query" is no good

2017-03-23 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: > On Thu, Mar 23, 2017 at 12:50 PM, Robert Haas wrote: > > Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b allowed a parallel > > plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE > > statement in a PL/pgsql

Re: [HACKERS] parallel "return query" is no good

2017-03-23 Thread Robert Haas
On Thu, Mar 23, 2017 at 12:50 PM, Robert Haas wrote: > Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b allowed a parallel > plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE > statement in a PL/pgsql block. As it turns out, the analysis that led > to

[HACKERS] parallel "return query" is no good

2017-03-23 Thread Robert Haas
Commit 7aea8e4f2daa4b39ca9d1309a0c4aadb0f7ed81b allowed a parallel plan to be generated when for a RETURN QUERY or RETURN QUERY EXECUTE statement in a PL/pgsql block. As it turns out, the analysis that led to this decision was totally wrong-headed, because the plan will always be executed using