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