Re: New Object Access Type hooks
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: 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-03-22T22:18:45Z
Lists: pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes: > Fixed Now that we got past the hard failures, we can see that the test falls over with (some?) non-default encodings, as for instance here: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2022-03-22%2020%3A23%3A13 I can replicate that by running the test under LANG=en_US.iso885915. What I think is happening is: (1) Rather unwisely, the relevant InvokeNamespaceSearchHook calls appear in recomputeNamespacePath. That means that their timing depends heavily on accidents of caching. (2) If we decide that we need an encoding conversion to talk to the client, there'll be a lookup for the conversion function early during session startup. That will cause the namespace search path to get computed then, before the test module has been loaded and certainly before the audit GUC has been turned on. (3) At the point where the test expects some audit notices to come out, nothing happens because the search path is already validated. I'm inclined to think that (1) is a seriously bad idea, not only because of this instability, but because (a) the namespace cache logic is unlikely to cause the search-path cache to get invalidated when something happens that might cause an OAT hook to wish to change its decision, and (b) this placement means that the hook is invoked during cache loading operations that are likely to be super-sensitive to any additional catalog accesses a hook might wish to do. (I await the results of the CLOBBER_CACHE_ALWAYS animals with trepidation.) Now, if our attitude to the OAT hooks is that we are going to sprinkle some at random and whether they are useful is someone else's problem, then maybe these are not interesting concerns. regards, tom lane
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