Re: New Object Access Type hooks
Michael Paquier <michael@paquier.xyz>
From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>, Andres Freund <andres@anarazel.de>, Mark Dilger <mark.dilger@enterprisedb.com>, Julien Rouhaud <rjuju123@gmail.com>, Joshua Brindle <joshua.brindle@crunchydata.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>, Robert Haas <robertmhaas@gmail.com>, Jeff Davis <pgsql@j-davis.com>, Joe Conway <joe@crunchydata.com>, Stephen Frost <sfrost@snowman.net>
Date: 2022-06-22T07:48:15Z
Lists: pgsql-hackers
On Mon, Apr 18, 2022 at 03:50:11PM +0900, Michael Paquier wrote: > A removal from recomputeNamespacePath() implies an addition at the end > of fetch_search_path() and fetch_search_path_array(). Perhaps an > extra one in RangeVarGetCreationNamespace()? The question is how much > of these we want, for example the search hook would be called now even > when doing relation-specific checks like RelationIsVisible() and the > kind. I have been playing with this issue, and if we want to minimize the number of times the list of namespaces in activeSearchPath gets checked through the search hook, it looks like this is going to require an additional cached list of namespace OIDs filtered through InvokeNamespaceSearchHook(). However, it is unclear to me how we can guarantee that any of the code paths forcing a recomputation of activeSearchPath are not used for a caching phase, so it looks rather easy to mess up things and finish with a code path using an unfiltered activeSearchPath. The set of *IsVisible() routines should be fine, at least. At the end, I am not sure that it is a wise time to redesign this area close to beta2, so I would vote for leaving this issue aside for now. Another thing that we could do is to tweak the tests and silence the part around OAT_NAMESPACE_SEARCH, which would increase the coverage with installcheck, removing the need for ENCODING and NO_LOCALE. -- Michael
Commits
-
Update some tests in 013_crash_restart.pl.
- 8803df4ea960 14.3 landed
- 7a43a1fc52d0 15.0 landed
-
Avoid freeing objects during json aggregate finalization
- 4eb979887968 15.0 cited
-
SQL/JSON constructors
- f4fb45d15c59 15.0 cited
-
Force NO_LOCALE / UTF8 for test_oat_hooks tests
- 7c51b7f7cc08 15.0 landed
-
Temporarily disable installcheck for test_oat_hooks module
- 5b29a9f77297 15.0 landed
-
Fix new Object Access hooks test
- f0206d99520e 15.0 landed
-
Add String object access hooks
- d11e84ea466b 15.0 landed
-
Add a test module for Object Access hooks
- 90efa2f5565d 15.0 landed