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

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andres Freund <andres(at)anarazel(dot)de>, Amit Kapila <akapila(at)postgresql(dot)org>, 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-25 18:15:19
Message-ID: CA+TgmoY8kwGi3ZYc0dcqU-m3YOgkzwqeiLfyd1YXLtHYwT14GA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

On Thu, Mar 25, 2021 at 5:08 AM Amit Kapila <amit(dot)kapila16(at)gmail(dot)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

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2021-03-25 18:51:22 pgsql: Rework HeapTupleHeader macros to reuse itemptr.h
Previous Message Alvaro Herrera 2021-03-25 13:50:29 pgsql: Remove StoreSingleInheritance reimplementation