Parallel bt build crashes when DSM_NONE
От | Kyotaro HORIGUCHI |
---|---|
Тема | Parallel bt build crashes when DSM_NONE |
Дата | |
Msg-id | 20180209.170635.256350357.horiguchi.kyotaro@lab.ntt.co.jp обсуждение исходный текст |
Ответы |
Re: Parallel bt build crashes when DSM_NONE
Re: Parallel bt build crashes when DSM_NONE |
Список | pgsql-hackers |
Hello. I happend to find that server crashes during regtest when DSM_NONE is enforced. The attached patch fixes that. The cause is the fact that _bt_spools_heapscan runs _bt_begin_parallel() even if dynamic_shared_memory_type is DSM_NONE. It is because plan_create_index_workers() is ignoring dynamic_shared_memory_type. We can reproduce this by letting initdb set dynamic_shared_memory_type=none regardless of actual availability. (Second attached) and just "make check". regards, -- Kyotaro Horiguchi NTT Open Source Software Center diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 740de49..3e8cd14 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -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 */ diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c index 2efd3b7..876e153 100644 --- a/src/bin/initdb/initdb.c +++ b/src/bin/initdb/initdb.c @@ -871,6 +871,7 @@ choose_dsm_implementation(void) #ifdef HAVE_SHM_OPEN int ntries = 10; + return "none"; while (ntries > 0) { uint32 handle;
В списке pgsql-hackers по дате отправления: