From: | Thomas Munro <tmunro(at)postgresql(dot)org> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Enable parallelism in REFRESH MATERIALIZED VIEW. |
Date: | 2021-03-17 02:05:43 |
Message-ID: | E1lMLZ9-0000bH-1x@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Enable parallelism in REFRESH MATERIALIZED VIEW.
Pass CURSOR_OPT_PARALLEL_OK to pg_plan_query() so that parallel plans
are considered when running the underlying SELECT query. This wasn't
done in commit e9baa5e9, which did this for CREATE MATERIALIZED VIEW,
because it wasn't yet known to be safe.
Since REFRESH always inserts into a freshly created table before later
merging or swapping the data into place with separate operations, we can
enable such plans here too.
Author: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
Reviewed-by: Hou, Zhijie <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com>
Reviewed-by: Luc Vlaming <luc(at)swarm64(dot)com>
Reviewed-by: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Discussion: https://postgr.es/m/CALj2ACXg-4hNKJC6nFnepRHYT4t5jJVstYvri%2BtKQHy7ydcr8A%40mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9e7ccd9ef64d05e87ceb1985d459bef9031205c0
Modified Files
--------------
doc/src/sgml/parallel.sgml | 26 +++++++++++++++++++++-----
src/backend/commands/matview.c | 2 +-
src/test/regress/expected/write_parallel.out | 3 +++
src/test/regress/sql/write_parallel.sql | 3 +++
4 files changed, 28 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Amit Kapila | 2021-03-17 02:19:51 | pgsql: Doc: Add a description of substream in pg_subscription. |
Previous Message | Peter Geoghegan | 2021-03-16 20:39:45 | pgsql: Fix comment about promising tuples. |