Inquiry About Determining Parallel Plans for REFRESH MATERIALIZED VIEW

From: Zhang Mingli <zmlpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Inquiry About Determining Parallel Plans for REFRESH MATERIALIZED VIEW
Date: 2025-01-16 04:39:06
Message-ID: f085f5d4-7858-48d0-b698-f0fd9e155c81@Spark
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi, all

I am currently exploring the execution of the REFRESH MATERIALIZED VIEW command  and have a specific question regarding the underlying query plan. As you know, the REFRESH command is a utility command, and using EXPLAIN REFRESH does not provide a plan structure for analysis.

During development, we want to ascertain whether the SELECT part of the REFRESH command executes with a parallel plan. While I understand that we can run EXPLAIN on the SELECT statement directly, we are interested in knowing if there is a method to determine the execution plan under the REFRESH command context.

Currently, we have configured the necessary settings for parallel queries and have been recording the execution time of the REFRESH command to compare parallel and non-parallel executions.

However, I’m looking for a more definitive way to verify if the plan is indeed parallel during the execution of the REFRESH command.

Any suggestions?

Zhang Mingli
www.hashdata.xyz

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2025-01-16 05:06:27 Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING
Previous Message Tom Lane 2025-01-16 04:34:14 Re: Make pg_stat_io view count IOs as bytes instead of blocks