mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-03-01 19:45:33 +08:00
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
This commit is contained in:
parent
80f021ef13
commit
88ef48c1cc
@ -5825,7 +5825,8 @@ plan_create_index_workers(Oid tableOid, Oid indexOid)
|
||||
double allvisfrac;
|
||||
|
||||
/* Return immediately when parallelism disabled */
|
||||
if (max_parallel_maintenance_workers == 0)
|
||||
if (dynamic_shared_memory_type == DSM_IMPL_NONE ||
|
||||
max_parallel_maintenance_workers == 0)
|
||||
return 0;
|
||||
|
||||
/* Set up largely-dummy planner state */
|
||||
|
Loading…
Reference in New Issue
Block a user