Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
От | Robert Haas |
---|---|
Тема | Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode |
Дата | |
Msg-id | CA+TgmoY0GdS7POPWB2nG3yiycNeLz05Mw53NunOjn8f8rZZuxw@mail.gmail.com обсуждение исходный текст |
Ответ на | pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode (Amit Kapila <akapila@postgresql.org>) |
Ответы |
Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode |
Список | pgsql-committers |
On Wed, Mar 17, 2021 at 10:14 PM Amit Kapila <akapila@postgresql.org> wrote: > Add a new GUC and a reloption to enable inserts in parallel-mode. > > Commit 05c8482f7f added the implementation of parallel SELECT for > "INSERT INTO ... SELECT ..." which may incur non-negligible overhead in > the additional parallel-safety checks that it performs, even when, in the > end, those checks determine that parallelism can't be used. This is > normally only ever a problem in the case of when the target table has a > large number of partitions. > > A new GUC option "enable_parallel_insert" is added, to allow insert in > parallel-mode. The default is on. > > In addition to the GUC option, the user may want a mechanism to allow > inserts in parallel-mode with finer granularity at table level. The new > table option "parallel_insert_enabled" allows this. The default is true. I find this fairly ugly. If you can't make the cost of checking whether parallelism is safe low enough that you don't need a setting for this, then I think perhaps you shouldn't have the feature at all. In other words, I propose that you revert both this and 05c8482f7f and come back when you have a better design that doesn't introduce so much overhead. -- Robert Haas EDB: http://www.enterprisedb.com
В списке pgsql-committers по дате отправления: