RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)

Поиск
Список
Период
Сортировка
От houzj.fnst@fujitsu.com
Тема RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)
Дата
Msg-id OS0PR01MB5716DB1E3F723F86314D080094F09@OS0PR01MB5716.jpnprd01.prod.outlook.com
обсуждение исходный текст
Ответ на Re: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)  (Amit Kapila <amit.kapila16@gmail.com>)
Ответы RE: Parallel Inserts (WAS: [bug?] Missed parallel safety checks..)  ("houzj.fnst@fujitsu.com" <houzj.fnst@fujitsu.com>)
Список pgsql-hackers
Based on the discussion here, I implemented the auto-safety-check feature.
Since most of the technical discussion happened here,I attatched the patches in
this thread.

The patches allow users to specify a parallel-safety option for both
partitioned and non-partitioned relations, and for non-partitioned relations if
users didn't specify, it would be computed automatically. If the user has
specified parallel-safety option then we would consider that instead of
computing the value by ourselves. But for partitioned table, if users didn't
specify the parallel dml safety, it will treat is as unsafe.

For non-partitioned relations, after computing the parallel-safety of relation
during the planning, we save it in the relation cache entry and invalidate the
cached parallel-safety for all relations in relcache for a particular database
whenever any function's parallel-safety is changed.

To make it possible for user to alter the safety to a not specified value to
get the automatic safety check, add a new default option(temporarily named
'DEFAULT' in addition to safe/unsafe/restricted) about parallel dml safety.

To facilitate users for providing a parallel-safety option, provide a utility
functionr "pg_get_table_parallel_dml_safety(regclass)" that returns records of
(objid, classid, parallel_safety) for all parallel unsafe/restricted
table-related objects from which the table's parallel DML safety is determined.
This will allow user to identify unsafe objects and if the required user can
change the parallel safety of required functions and then use the parallel
safety option for the table.

Best regards,
houzj

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Soumyadeep Chakraborty
Дата:
Сообщение: Re: Changes to recovery_min_apply_delay are ignored while waiting for delay
Следующее
От: Kyotaro Horiguchi
Дата:
Сообщение: Re: straightening out backend process startup