When (and whether) should we improve the chapter on parallel query to accommodate parallel data updates?

From: "tsunakawa(dot)takay(at)fujitsu(dot)com" <tsunakawa(dot)takay(at)fujitsu(dot)com>
To: "pgsql-hackers(at)lists(dot)postgresql(dot)org" <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: When (and whether) should we improve the chapter on parallel query to accommodate parallel data updates?
Date: 2021-01-06 06:43:32
Message-ID: TYAPR01MB29904D13AA46F91D306EE37BFED00@TYAPR01MB2990.jpnprd01.prod.outlook.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

While I'm reviewing patches for parallel operations, it occured to me that we may need to correct the words and enrich content in "15. Parallel Query". I don't have a concrete image of how the content should be yet, and I think the documentation may be improved after the feature freeze (i.e. April.) Is anyone already doing this kind of modifications?

First, as parallel data updates are being introduced, the chapter title "Parallel Query" should be changed to "Parallel Execution" or "Parallel Operation". It's confusing to see that Postgres uses "query" to also mean statements other than SELECT, but the SQL standard seems to differentiate them; SELECT is explained in "7 Query expressions" and INSERT/DELETE/UPDATE etc. are described in "14 Data manipulation". Following the SQL standard, Postgres manual have separate chapters "6. Data Manipulation" and "7. Queries". (e.g. query plan in EXPLAIN should have been execution plan? But it's too late now.) The chapter content should also be changed to use appropriate words carefully.

FYI, Oracle wisely give the chapter title "8 Using Parallel Execution" [1]. SQL Server isn't very clear, but it seems that it doesn't use "query" for INSERT, like in "The TABLOCK hint can enable parallel insert operations." [2] [3]

Second, I expected to see descriptions in "15. Parallel Query" that there are other (recently added) parallel operations such as parallel index build and parallel VACUUM, but I didn't find them. Also, I couldn't find information on parallelism in possible chapters such as "11. Indexes" or "25. Routine Database Maintenance Tasks". Where can users notice that they can parallelize and speed up those operations? Only in reference pages? I think it's better to have those descriptions in the Parallel Query chapter.

If nobody hasn't started making this kind of modifications, can we deter it after the feature freeze? Or should people involved in developing parallel features cooperate to revise the manual as part of their patches?

Regards
Takayuki Tsunakawa

[1]
8 Using Parallel Execution
https://docs.oracle.com/en/database/oracle/oracle-database/21/vldbg/using-parallel.html#GUID-3E2AE088-2505-465E-A8B2-AC38813EA355

[2]
Query Processing Architecture Guide
https://docs.microsoft.com/en-us/sql/relational-databases/query-processing-architecture-guide?view=sql-server-ver15

[3]
INSERT (Transact-SQL)
https://docs.microsoft.com/en-us/sql/t-sql/statements/insert-transact-sql?view=sql-server-ver15#best-practices

Regards
Takayuki Tsunakawa

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Luc Vlaming 2021-01-06 06:53:14 Re: Parallel Inserts in CREATE TABLE AS
Previous Message Bharath Rupireddy 2021-01-06 06:43:24 Re: Parallel Inserts in CREATE TABLE AS