I stumbled upon a disturbing fact with regards to permissions and clustering and I am wondering what best to do about it:
If you have not turned on permission caching, each single query for a permission will result in a flush of the permission on all clusters, so you get an enormous amount of flushing activity.
Two options here:
a) Turn of automatic flashing of the permission cache whenever permissions::permission_p is called
b) Turn on permission caching and make sure no acs_permission__grant and acs_permission__revoke exists in my packages. I turned this on and the site is much more responsive now.
If util_memoize is faster than the db, and, as it seems, most .LRN packages (if not all) don't use the acs_permission__grant/revoke, why is the default behaviour still "0" and shouldn't we at least automatically set it to "1" or send a warning message if "ClusterPeerIP" is not empty?
Furthermore, shouldn't we create a test for acs_permission__grant / revoke calls and have it fail if they still exist as the recommended behavior should be to use the TCL permission functions (and not do all in PL/SQL). Or am I mistaken in my assumption that core functionality should be executed in TCL and not anymore in plsql / pgsql?