Re: try_relation_open and relation_open behave different.

2021-10-18 Thread Alvaro Herrera
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

Re: try_relation_open and relation_open behave different.

2021-10-18 Thread Xing GUO
On Mon, Oct 18, 2021 at 2:45 PM Michael Paquier wrote: > On Mon, Oct 18, 2021 at 01:56:07PM +0800, Xing GUO wrote: > > My question is, is it a deliberate design that makes try_relation_open > and > > relation_open different? Shall we mention it in the comment of > > try_relation_open OR adding

Re: try_relation_open and relation_open behave different.

2021-10-18 Thread Michael Paquier
On Mon, Oct 18, 2021 at 01:56:07PM +0800, Xing GUO wrote: > My question is, is it a deliberate design that makes try_relation_open and > relation_open different? Shall we mention it in the comment of > try_relation_open OR adding the checker to relation_open? I am not sure what you mean here,

try_relation_open and relation_open behave different.

2021-10-17 Thread Xing GUO
Hi hackers, I'm writing an extension that employs `object_access_hook`. I want to monitor the table creation event and record the mapping between `reloid` and `relfilenode` during a transaction. Here's my code snippet, ``` static void my_object_access_hook(ObjectAccessType access,