aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/postgres.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2016-02-25 13:02:18 +0530
committerRobert Haas <rhaas@postgresql.org>2016-02-25 13:02:18 +0530
commit57a6a72b6bc98f3003e87bc31de4b9c2c89fe019 (patch)
tree088d835d52a1eb3ae57da04fc3e86e8c14321e19 /src/backend/tcop/postgres.c
parent25924ac47abde5330ca502e23796e9d37cd1ae68 (diff)
downloadpostgresql-57a6a72b6bc98f3003e87bc31de4b9c2c89fe019.tar.gz
postgresql-57a6a72b6bc98f3003e87bc31de4b9c2c89fe019.zip
Enable parallelism for prepared statements and extended query protocol.
Parallel query can't handle running a query only partially rather than to completion. However, there seems to be no way to run a statement prepared via SQL PREPARE other than to completion, so we can enable it there 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 a non-zero rowcount, but some other client might. If that happens, and a parallel plan was chosen, we'll execute the parallel plan without using any workers, which may be somewhat inefficient but should still work. Hopefully this won't be a problem; users can always set max_parallel_degree=0 to avoid choosing parallel plans in the first place. Amit Kapila, reviewed by me.
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r--src/backend/tcop/postgres.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c
index 390816bb9c2..115166b6f6a 100644
--- a/src/backend/tcop/postgres.c
+++ b/src/backend/tcop/postgres.c
@@ -1381,7 +1381,7 @@ exec_parse_message(const char *query_string, /* string to execute */
numParams,
NULL,
NULL,
- 0, /* default cursor options */
+ CURSOR_OPT_PARALLEL_OK, /* allow parallel mode */
true); /* fixed result */
/* If we got a cancel signal during analysis, quit */