Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit57a6a72

Browse files
committed
Enable parallelism for prepared statements and extended query protocol.
Parallel query can't handle running a query only partially rather thanto completion. However, there seems to be no way to run a statementprepared via SQL PREPARE other than to completion, so we can enable itthere without a problem.The situation is more complicated for the extend query protocol.libpq seems to provide no way to send an Execute message with anon-zero rowcount, but some other client might. If that happens, anda parallel plan was chosen, we'll execute the parallel plan withoutusing any workers, which may be somewhat inefficient but should stillwork. Hopefully this won't be a problem; users can always setmax_parallel_degree=0 to avoid choosing parallel plans in the firstplace.Amit Kapila, reviewed by me.
1 parent25924ac commit57a6a72

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎src/backend/commands/prepare.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString)
159159
nargs,
160160
NULL,
161161
NULL,
162-
0,/*default cursor options */
162+
CURSOR_OPT_PARALLEL_OK,/*allow parallel mode */
163163
true);/* fixed result */
164164

165165
/*

‎src/backend/tcop/postgres.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ exec_parse_message(const char *query_string,/* string to execute */
13811381
numParams,
13821382
NULL,
13831383
NULL,
1384-
0,/*default cursor options */
1384+
CURSOR_OPT_PARALLEL_OK,/*allow parallel mode */
13851385
true);/* fixed result */
13861386

13871387
/* If we got a cancel signal during analysis, quit */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp