Skip to content

Commit 88ef48c

Browse files
committed
Fix parallel index builds for dynamic_shared_memory_type=none.
The previous code failed to realize that this setting effectively disables parallelism, and would crash if it decided to attempt parallelism anyway. Instead, treat it as a disabling condition. Kyotaro Horiguchi, who also reported the issue. Reviewed by Michael Paquier and Peter Geoghegan. Discussion: http://postgr.es/m/20180209.170635.256350357.horiguchi.kyotaro@lab.ntt.co.jp
1 parent 80f021e commit 88ef48c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/optimizer/plan/planner.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5825,7 +5825,8 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
58255825
double allvisfrac;
58265826

58275827
/* Return immediately when parallelism disabled */
5828-
if (max_parallel_maintenance_workers == 0)
5828+
if (dynamic_shared_memory_type == DSM_IMPL_NONE ||
5829+
max_parallel_maintenance_workers == 0)
58295830
return 0;
58305831

58315832
/* Set up largely-dummy planner state */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy