aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/test/modules/test_oat_hooks/Makefile5
-rw-r--r--src/test/modules/test_oat_hooks/expected/test_oat_hooks.out2
-rw-r--r--src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql2
-rw-r--r--src/test/modules/test_oat_hooks/test_oat_hooks.c5
4 files changed, 8 insertions, 6 deletions
diff --git a/src/test/modules/test_oat_hooks/Makefile b/src/test/modules/test_oat_hooks/Makefile
index d03ef2caf17..ba068acc535 100644
--- a/src/test/modules/test_oat_hooks/Makefile
+++ b/src/test/modules/test_oat_hooks/Makefile
@@ -1,13 +1,10 @@
# 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
diff --git a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
index 4192a2fb49e..45ff276f7e9 100644
--- a/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
+++ b/src/test/modules/test_oat_hooks/expected/test_oat_hooks.out
@@ -155,7 +155,7 @@ NOTICE: in process utility: superuser attempting set
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]
diff --git a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
index 7c382027824..09e61864ee2 100644
--- a/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
+++ b/src/test/modules/test_oat_hooks/sql/test_oat_hooks.sql
@@ -39,7 +39,7 @@ SET test_oat_hooks.deny_object_access = true;
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');
diff --git a/src/test/modules/test_oat_hooks/test_oat_hooks.c b/src/test/modules/test_oat_hooks/test_oat_hooks.c
index b50567749c4..eb7564ce22e 100644
--- a/src/test/modules/test_oat_hooks/test_oat_hooks.c
+++ b/src/test/modules/test_oat_hooks/test_oat_hooks.c
@@ -192,6 +192,11 @@ _PG_fini(void)
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";