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.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/backend/access/transam/parallel.c b/src/backend/access/transam/parallel.c
index 1f542ed8d86..d3431a7c306 100644
--- a/src/backend/access/transam/parallel.c
+++ b/src/backend/access/transam/parallel.c
@@ -428,9 +428,10 @@ ReinitializeParallelDSM(ParallelContext *pcxt)
fps = shm_toc_lookup(pcxt->toc, PARALLEL_KEY_FIXED, false);
fps->last_xlog_end = 0;
- /* Recreate error queues. */
+ /* Recreate error queues (if they exist). */
error_queue_space =
- shm_toc_lookup(pcxt->toc, PARALLEL_KEY_ERROR_QUEUE, false);
+ shm_toc_lookup(pcxt->toc, PARALLEL_KEY_ERROR_QUEUE, true);
+ Assert(pcxt->nworkers == 0 || error_queue_space != NULL);
for (i = 0; i < pcxt->nworkers; ++i)
{
char *start;