pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Thomas Munro <tmunro@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Enable parallelism in REFRESH MATERIALIZED VIEW.
Date: Wed, 17 Mar 2021 02:05:43 +0000
Message-ID: <E1lMLZ9-0000bH-1x@gemulon.postgresql.org> (raw)

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.rupireddyforpostgres@gmail.com>
Reviewed-by: Hou, Zhijie <houzj.fnst@cn.fujitsu.com>
Reviewed-by: Luc Vlaming <luc@swarm64.com>
Reviewed-by: Thomas Munro <thomas.munro@gmail.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(-)



Message-ID: <E1lMLZ9-0000bH-1x@gemulon.postgresql.org>
Permalink:  ../E1lMLZ9-0000bH-1x@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lMLZ9-0000bH-1x@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tmunro@postgresql.org
  Subject: Re: pgsql: Enable parallelism in REFRESH MATERIALIZED VIEW.
  In-Reply-To: <E1lMLZ9-0000bH-1x@gemulon.postgresql.org>
  References: <E1lMLZ9-0000bH-1x@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox