Re: try_relation_open and relation_open behave different.

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: Xing GUO <higuoxing(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: try_relation_open and relation_open behave different.
Date: 2021-10-18 13:44:24
Message-ID: 202110181344.565nglsi6til@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2021-Oct-18, Xing GUO wrote:

> However, I can open an "uncommitted" relation using relation_open() and
> cannot open it using try_relation_open().
> Since Postgres doesn't write the "uncommitted" relation descriptor to
> SysCache and try_relation_open() checks if the
> relation exists in SysCache while relation_open() doesn't check it.

Hmm, is it sufficient to do CommandCounterIncrement() after your
"uncommitted" relation change and the place where you do
try_relation_open()?

--
Álvaro Herrera Valdivia, Chile — https://www.EnterpriseDB.com/
"Linux transformó mi computadora, de una `máquina para hacer cosas',
en un aparato realmente entretenido, sobre el cual cada día aprendo
algo nuevo" (Jaime Salinas)

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amul Sul 2021-10-18 13:54:13 Re: [Patch] ALTER SYSTEM READ ONLY
Previous Message Tom Lane 2021-10-18 13:37:33 Re: can we add subscription TAP test option "vcregress subscriptioncheck" for MSVC builds?