per gripelet from Tom Lane.
# src/test/modules/test_oat_hooks/Makefile
MODULE_big = test_oat_hooks
-OBJS = \
- $(WIN32RES) \
- test_oat_hooks.o
+OBJS = test_oat_hooks.o $(WIN32RES)
PGFILEDESC = "test_oat_hooks - example use of object access hooks"
REGRESS = test_oat_hooks
-NO_INSTALLCHECK = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
NOTICE: in object_access_hook_str: superuser attempting alter (set) [test_oat_hooks.deny_utility_commands]
NOTICE: in object_access_hook_str: superuser finished alter (set) [test_oat_hooks.deny_utility_commands]
NOTICE: in process utility: superuser finished set
--- Try again as non-superuser with permisisons denied
+-- Try again as non-superuser with permissions denied
SET SESSION AUTHORIZATION regress_test_user;
NOTICE: in process utility: superuser attempting set
NOTICE: in object_access_hook_str: non-superuser attempting alter (set) [session_authorization]
SET test_oat_hooks.deny_exec_perms = true;
SET test_oat_hooks.deny_utility_commands = true;
--- Try again as non-superuser with permisisons denied
+-- Try again as non-superuser with permissions denied
SET SESSION AUTHORIZATION regress_test_user;
SELECT * FROM regress_test_table;
SELECT regress_test_func('arg');
static void
emit_audit_message(const char *type, const char *hook, char *action, char *objName)
{
+ /*
+ * Ensure that audit messages are not duplicated by only emitting them from
+ * a leader process, not a worker process. This makes the test results
+ * deterministic even if run with force_parallel_mode = regress.
+ */
if (REGRESS_audit && !IsParallelWorker())
{
const char *who = superuser_arg(GetUserId()) ? "superuser" : "non-superuser";