From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | Amit Kapila <akapila(at)postgresql(dot)org> |
Cc: | pgsql-committers <pgsql-committers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode |
Date: | 2021-03-22 12:47:47 |
Message-ID: | CA+TgmoY0GdS7POPWB2nG3yiycNeLz05Mw53NunOjn8f8rZZuxw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
On Wed, Mar 17, 2021 at 10:14 PM Amit Kapila <akapila(at)postgresql(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2021-03-22 13:53:53 | pgsql: More code cleanup for configurable TOAST compression. |
Previous Message | Michael Paquier | 2021-03-22 05:03:39 | pgsql: Fix concurrency issues with WAL segment recycling on Windows |