aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/parallel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/access/transam/parallel.c')
-rw-r--r--src/backend/access/transam/parallel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index 9c7428f5d6c..17f9a5ae6e4 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -135,6 +135,14 @@ CreateParallelContext(parallel_worker_main_type entrypoint, int nworkers)
if (dynamic_shared_memory_type == DSM_IMPL_NONE)
nworkers = 0;
+ /*
+ * If we are running under serializable isolation, we can't use
+ * parallel workers, at least not until somebody enhances that mechanism
+ * to be parallel-aware.
+ */
+ if (IsolationIsSerializable())
+ nworkers = 0;
+
/* We might be running in a short-lived memory context. */
oldcontext = MemoryContextSwitchTo(TopTransactionContext);