diff --git a/src/test/modules/test_session_hooks/test_session_hooks.c b/src/test/modules/test_session_hooks/test_session_hooks.c
index d047c5d219..6ffd1cca08 100644
--- a/src/test/modules/test_session_hooks/test_session_hooks.c
+++ b/src/test/modules/test_session_hooks/test_session_hooks.c
@@ -44,6 +44,12 @@ register_session_hook(const char *hook_at)
 	SPI_connect();
 	PushActiveSnapshot(GetTransactionSnapshot());
 
+	/* Disable parallelism in this context */
+	SetConfigOption("max_parallel_workers", "0",
+					PGC_SUSET, PGC_S_OVERRIDE);
+	SetConfigOption("max_parallel_workers_per_gather", "0",
+					PGC_SUSET, PGC_S_OVERRIDE);
+
 	/* Check the current user validity */
 	username = GetUserNameFromId(GetUserId(), false);
 
