Re: Parallel execution and prepared statements
Albe Laurenz <laurenz.albe@wien.gv.at>
From: Albe Laurenz <laurenz.albe@wien.gv.at>
To: "'Robert Haas *EXTERN*'" <robertmhaas@gmail.com>
Cc: "pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>, "t.bussmann@gmx.net" <t.bussmann@gmx.net>
Date: 2016-11-21T10:29:37Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Enable parallelism for prepared statements and extended query protocol.
- 57a6a72b6bc9 9.6.0 cited
Robert Haas wrote:
>> /* creates a parallel-enabled plan */
>> PQprepare(conn, "pstmt", "SELECT id FROM l WHERE val = $1", 1, NULL);
>> /* blows up with "cannot insert tuples during a parallel operation" */
>> PQexec(conn, "CREATE TABLE bad(id) AS EXECUTE pstmt('abcd')");
>
> Ouch. I missed that.
>
>> With Tobias' patch, this does not fail.
>>
>> I think we should either apply something like that patch or disable parallel
>> execution for prepared statements altogether and document that.
>
> I agree. I think probably the first option is better, but I might
> have to commit with one hand so I can hold my nose with the other.
Is there a better, more consistent approach for that?
Yours,
Laurenz Albe