aboutsummaryrefslogtreecommitdiff
path: root/src/test/modules/test_oat_hooks/test_oat_hooks.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/modules/test_oat_hooks/test_oat_hooks.c')
-rw-r--r--src/test/modules/test_oat_hooks/test_oat_hooks.c5
1 files changed, 5 insertions, 0 deletions
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";