Re: Parallel execution and prepared statements

From: Tobias Bussmann <t(dot)bussmann(at)gmx(dot)net>
To: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Laurenz Albe <laurenz(dot)albe(at)wien(dot)gv(dot)at>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Parallel execution and prepared statements
Date: 2016-12-02 10:01:20
Message-ID: 0FF36F51-62F1-4E2F-B86B-BD4933899737@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> On Thu, Dec 1, 2016 at 9:40 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>>
>> OK, then my vote is to do it that way for now.

Thanks for your opinion. That's fine with me.

> Am 02.12.2016 um 07:22 schrieb Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>:
> Done that way in attached patch.

Did a quick review: The patch applies cleanly against current head. make installcheck with force_parallel_mode = regress passes all tests. My manual tests show that parallel query is working for prepared statements in SQL with PREPARE and EXECUTE. CREATE TABLE AS EXECUTE is working, EXPLAIN on that shows a parallel plan, EXPLAIN ANALZE indicates 0 launched workers for that. Looks fine so far!

You should however include a sentence in the documentation on that parallel plan w/o workers corner-case behaviour. Feel free to take that from my patch or phase a better wording.

And again my question regarding back patching to 9.6:
- 9.6 is currently broken as Laurenz showed in [1]
- 9.6 does not have documented that SQL PREPARE prepared statements cannot not use parallel query

The former could be fixed by back patching the full patch which would void the latter. Or it could be fixed by disabling generation of parallel plans in extended query protocol prepare. Alternatively only the change in execMain.c could be back patched. In these cases we would need to have the a separate wording for the 9.6 docs.

Best regards,
Tobias

[1] A737B7A37273E048B164557ADEF4A58B539990D0(at)ntex2010i(dot)host(dot)magwien(dot)gv(dot)at

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fabien COELHO 2016-12-02 10:53:05 Re: pgbench more operators & functions
Previous Message Alexander Korotkov 2016-12-02 10:01:07 Re: UNDO and in-place update