RE: [bug?] Missed parallel safety checks, and wrong parallel safety
От | houzj.fnst@fujitsu.com |
---|---|
Тема | RE: [bug?] Missed parallel safety checks, and wrong parallel safety |
Дата | |
Msg-id | OS0PR01MB5716366EFB93F6354BF83A0F94EA9@OS0PR01MB5716.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: [bug?] Missed parallel safety checks, and wrong parallel safety (Amit Kapila <amit.kapila16@gmail.com>) |
Ответы |
Re: [bug?] Missed parallel safety checks, and wrong parallel safety
Parallel Inserts (WAS: [bug?] Missed parallel safety checks..) |
Список | pgsql-hackers |
On July 27, 2021 1:14 PM Amit Kapila <amit.kapila16@gmail.com> > On Mon, Jul 26, 2021 at 8:33 PM Robert Haas <robertmhaas@gmail.com> > wrote: > > > > On Sat, Jul 24, 2021 at 5:52 AM Amit Kapila <amit.kapila16@gmail.com> > wrote: > > > I think for the consistency argument how about allowing users to > > > specify a parallel-safety option for both partitioned and > > > non-partitioned relations but for non-partitioned relations if users > > > didn't specify, it would be computed automatically? If the user has > > > specified parallel-safety option for non-partitioned relation then we > > > would consider that instead of computing the value by ourselves. > > > > Having the option for both partitioned and non-partitioned tables > > doesn't seem like the worst idea ever, but I am also not entirely sure > > that I understand the point. > > > > Consider below ways to allow the user to specify the parallel-safety option: > > (a) > CREATE TABLE table_name (...) PARALLEL DML { UNSAFE | RESTRICTED | SAFE } ... > ALTER TABLE table_name PARALLEL DML { UNSAFE | RESTRICTED | SAFE } .. > > OR > > (b) > CREATE TABLE table_name (...) WITH (parallel_dml_enabled = true) > ALTER TABLE table_name (...) WITH (parallel_dml_enabled = true) Personally, I think the approach (a) might be better. Since it's similar to ALTER FUNCTION PARALLEL XXX which user might be more familiar with. Besides, I think we need a new default value about parallel dml safety. Maybe 'auto' or 'null'(different from safe/restricted/unsafe). Because, user is likely to alter the safety to the default value to get the automatic safety check, a independent default value can make it more clear. Best regards, Houzj
В списке pgsql-hackers по дате отправления: