On Wed, Jul 28, 2021 at 12:52 PM houzj.f...@fujitsu.com <houzj.f...@fujitsu.com> wrote: > > > 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. >
I think so too. > 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. > Yes, I was thinking something similar when I said "Provided it is possible to distinguish between the default parallel-safety (unsafe) and that default being explicitly specified by the user". If we don't have a new default value, then we need to distinguish these cases, but I'm not sure Postgres does something similar elsewhere (for example, for function parallel-safety, it's not currently recorded whether parallel-safety=unsafe is because of the default or because the user specifically set it to what is the default value). Opinions? Regards, Greg Nancarrow Fujitsu Australia