Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used

Kyotaro Horiguchi <horikyota.ntt@gmail.com>

From: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
To: exclusion@gmail.com
Cc: tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Date: 2023-07-26T02:53:40Z
Lists: pgsql-bugs
At Wed, 26 Jul 2023 11:29:23 +0900 (JST), Kyotaro Horiguchi <horikyota.ntt@gmail.com> wrote in 
> At Tue, 25 Jul 2023 13:00:00 +0300, Alexander Lakhin <exclusion@gmail.com> wrote in 
> > 3) has_table_privilegeX() can fail sporadically when executed within a
> >  parallel worker
> 
> Doesn't this imply that the function isn't parallel-safe? The issue is
> gone by marking it and all variants as parallel-restricted. It seems
> to be a reasolable way to address this issue.

Mmm. This may give somewhat different impression from my intention.

I meant that it seems that the function may return different values on
different workers for the same parameter. This means the function is
not "stable" or "stable but parallel-unsafe". I think the latter is
true.

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



Commits

  1. Harden xxx_is_visible() functions against concurrent object drops.

  2. Harden has_xxx_privilege() functions against concurrent object drops.