Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode - Mailing list pgsql-committers

From Robert Haas
Subject Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode
Date
Msg-id CA+TgmoY8kwGi3ZYc0dcqU-m3YOgkzwqeiLfyd1YXLtHYwT14GA@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode  (Amit Kapila <amit.kapila16@gmail.com>)
Responses Re: pgsql: Add a new GUC and a reloption to enable inserts in parallel-mode  (Amit Kapila <amit.kapila16@gmail.com>)
List pgsql-committers
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. If it's possible to avoid that requirement by doing
this some other way, it would be a big win. I'm not sure whether it is
or exactly what would be involved, but relying on the relcache/sinval
interaction surely won't work.

Also, it would address the concern Takayuki-san raised about having to
recompute this in each session. I don't think it would be worth doing
for that reason alone, but it could be a side benefit.

-- 
Robert Haas
EDB: http://www.enterprisedb.com



pgsql-committers by date:

Previous
From: Alvaro Herrera
Date:
Subject: pgsql: Remove StoreSingleInheritance reimplementation
Next
From: Alvaro Herrera
Date:
Subject: pgsql: Rework HeapTupleHeader macros to reuse itemptr.h