From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
Cc: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "t(dot)bussmann(at)gmx(dot)net" <t(dot)bussmann(at)gmx(dot)net> |
Subject: | Re: Parallel execution and prepared statements |
Date: | 2016-11-16 13:47:16 |
Message-ID: | CA+TgmobA5yNxfL6Rp-JDgF=OjGvEmdyDDkv2fKLJvCY2Q=xMTw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Nov 15, 2016 at 10:41 AM, Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> wrote:
> Tobias Bussmann has discovered an oddity with prepared statements.
>
> Parallel scan is used with prepared statements, but only if they have
> been created with protocol V3 "Parse".
> If a prepared statement has been prepared with the SQL statement PREPARE,
> it will never use a parallel scan.
>
> I guess that is an oversight in commit 57a6a72b, right?
> PrepareQuery in commands/prepare.c should call CompleteCachedPlan
> with cursor options CURSOR_OPT_PARALLEL_OK, just like
> exec_prepare_message in tcop/postgres.c does.
>
> The attached patch fixes the problem for me.
Actually, commit 57a6a72b made this change, and then 7bea19d0 backed
it out again because it turned out to break things.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-11-16 13:50:22 | Re: Patch: Implement failover on libpq connect level. |
Previous Message | Amit Kapila | 2016-11-16 13:41:46 | Re: Parallel execution and prepared statements |