From: | "Hou, Zhijie" <houzj(dot)fnst(at)cn(dot)fujitsu(dot)com> |
---|---|
To: | Amit Kapila <amit(dot)kapila16(at)gmail(dot)com> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Greg Nancarrow <gregn4422(at)gmail(dot)com>, vignesh C <vignesh21(at)gmail(dot)com>, Amit Langote <amitlangote09(at)gmail(dot)com>, David Rowley <dgrowleyml(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)fujitsu(dot)com> |
Subject: | RE: Determine parallel-safety of partition relations for Inserts |
Date: | 2021-01-29 06:43:14 |
Message-ID: | 7da04d9f3a674268898c64515ba7424c@G08CNEXMBPEKD05.g08.fujitsu.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
Attatching v1 patches, introducing options which let user manually control whether to use parallel dml.
About the patch:
1. add a new guc option: enable_parallel_dml (boolean)
2. add a new tableoption: parallel_dml (boolean)
The default of both is off(false).
User can set enable_parallel_dml in postgresql.conf or seesion to enable parallel dml.
If user want to choose some specific to use parallel insert, they can set table.parallel_dml to on.
Some attention:
(1)
Currently if guc option enable_parallel_dml is set to on but table's parallel_dml is off,
planner still do not consider parallel for dml.
In this way, If user want to use parallel dml , they have to set enable_parallel_dml=on and set parallel_dml = on.
If someone dislike this, I think we can also let tableoption. parallel_dml's default value to on ,with this user only need
to set enable_parallel_dml=on
(2)
For the parallel_dml.
If target table is partitioned, and it's parallel_dml is set to on, planner will ignore
The option value of it's child.
This is beacause we can not divide dml plan to separate table, so we just check the target table itself.
Thoughts and comments are welcome.
Best regards,
houzj
Attachment | Content-Type | Size |
---|---|---|
v1_0004-reloption-parallel_dml-test-and-doc.patch | application/octet-stream | 30.8 KB |
v1_0001-guc-option-enable_parallel_dml-src.patch | application/octet-stream | 3.5 KB |
v1_0002-guc-option-enable_parallel_dml-doc-and-test.patch | application/octet-stream | 4.9 KB |
v1_0003-reloption-parallel_dml-src.patch | application/octet-stream | 4.9 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Bharath Rupireddy | 2021-01-29 06:44:17 | Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit |
Previous Message | Joel Jacobson | 2021-01-29 06:25:03 | Re: Add primary keys to system catalogs |