Skip to content

Commit 34aebcf

Browse files
committed
Allow parallelism in COPY (query) TO ...;
Previously this was not allowed, as copy.c didn't set the CURSOR_OPT_PARALLEL_OK flag when planning the query. Set it. While the lack of parallel query for COPY isn't strictly speaking a bug, it does prevent parallelism from being used in a facility commonly used to run long running queries. Thus backpatch to 9.6. Author: Andres Freund Discussion: https://postgr.es/m/20170531231958.ihanapplorptykzm@alap3.anarazel.de Backpatch: 9.6, where parallelism was introduced.
1 parent de492c1 commit 34aebcf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/copy.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1527,7 +1527,7 @@ BeginCopy(ParseState *pstate,
15271527
}
15281528

15291529
/* plan the query */
1530-
plan = pg_plan_query(query, 0, NULL);
1530+
plan = pg_plan_query(query, CURSOR_OPT_PARALLEL_OK, NULL);
15311531

15321532
/*
15331533
* With row level security and a user using "COPY relation TO", we

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy