Re: BUG #18014: Releasing catcache entries makes schema_to_xmlschema() fail when parallel workers are used
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Kyotaro Horiguchi <horikyota.ntt@gmail.com>, exclusion@gmail.com, pgsql-bugs@lists.postgresql.org
Date: 2023-07-26T03:32:38Z
Lists: pgsql-bugs
On Tue, Jul 25, 2023 at 10:41:57PM -0400, Tom Lane wrote: > As I said earlier, I think that's a purely coincidental "fix" for > this specific manifestation. Either SearchSysCacheExists followed > by a syscache lookup of the same tuple should be considered safe, > or it shouldn't. If it should be considered safe, we need to fix the > cache-clobber test scaffolding to not give a false positive. While if > it shouldn't, we need to get rid of that coding pattern, not apply > high-level band-aids that remove just one particular path to reaching > the problem. I'm not dead set on either answer at this point, but > I think those are the plausible alternatives. FWIW, I'm having a hard time thinking about a reason that we should not support SearchSysCacheExists()+lookup to be a valid pattern, even if the cache is clobbered. I am pretty sure that there are other code paths in the tree, not mentioned on this thread, that do exactly that (haven't checked, but indexcmds.c is one coming in mind). -- Michael
Commits
-
Harden xxx_is_visible() functions against concurrent object drops.
- fcdd6689d09c 17.0 landed
-
Harden has_xxx_privilege() functions against concurrent object drops.
- 403ac226ddd6 17.0 landed