Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
От | Amit Kapila |
---|---|
Тема | Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode |
Дата | |
Msg-id | CAA4eK1L7YcGcMdWB3Jh+YU_t+WftWuwr-YVONj_r77O5dZUNTw@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode (Robert Haas <robertmhaas@gmail.com>) |
Ответы |
Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
|
Список | pgsql-committers |
On Thu, Mar 25, 2021 at 11:45 PM Robert Haas <robertmhaas@gmail.com> wrote: > > On Thu, Mar 25, 2021 at 5:08 AM Amit Kapila <amit.kapila16@gmail.com> wrote: > > Wouldn't we need to invalidate the hash entries as soon as something > > parallel-unsafe is associated with them? > > Yes. > > > If so, how is this better > > than setting a flag in relcache? > > You can't legally access a flag in the relcache without taking a > relation lock. > But won't some form of lock is required for each rel entry in the hash table as well for the same duration as is required for rel? Because otherwise, while we are processing the statement or other relations in the query, something parallel-unsafe could be attached to that corresponding rel entry in the hash table. And, I feel probably some concurrency bottleneck might happen because DDL/DML needs to access this table at the same time. -- With Regards, Amit Kapila.
В списке pgsql-committers по дате отправления: