回复: 回复: [PATCH] BUG FIX: Core dump could happen when VACUUM FULL in standalone mode

Поиск
Список
Период
Сортировка
От Yulin PEI
Тема 回复: 回复: [PATCH] BUG FIX: Core dump could happen when VACUUM FULL in standalone mode
Дата
Msg-id HK0PR01MB2274472F0850D8596E2A784BF4F40@HK0PR01MB2274.apcprd01.prod.exchangelabs.com
обсуждение исходный текст
Ответ на Re: 回复: [PATCH] BUG FIX: Core dump could happen when VACUUM FULL in standalone mode  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I think you are right after reading code in compute_parallel_vacuum_workers() :)


发件人: Tom Lane <tgl@sss.pgh.pa.us>
发送时间: 2020年12月1日 2:54
收件人: Yulin PEI <ypeiae@connect.ust.hk>
抄送: Masahiko Sawada <sawada.mshk@gmail.com>; pgsql-hackers@lists.postgresql.org <pgsql-hackers@lists.postgresql.org>
主题: Re: 回复: [PATCH] BUG FIX: Core dump could happen when VACUUM FULL in standalone mode
 
Yulin PEI <ypeiae@connect.ust.hk> writes:
> Yes, I agree because (IsNormalProcessingMode() ) means that current process is not in bootstrap mode and postmaster process will not build index.
> So my new modified patch is attached.

This is a good catch, but the proposed fix still seems pretty random
and unlike how it's done elsewhere.  It seems to me that since
index_build() is relying on plan_create_index_workers() to assess
parallel safety, that's where to check IsUnderPostmaster.  Moreover,
the existing code in compute_parallel_vacuum_workers (which gets
this right) associates the IsUnderPostmaster check with the initial
check on max_parallel_maintenance_workers.  So I think that the
right fix is to adopt the compute_parallel_vacuum_workers coding
in plan_create_index_workers, and thereby create a model for future
uses of max_parallel_maintenance_workers to follow.

                        regards, tom lane

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Masahiko Sawada
Дата:
Сообщение: Re: VACUUM (DISABLE_PAGE_SKIPPING on)
Следующее
От: James Coleman
Дата:
Сообщение: Re: Fix generate_useful_gather_paths for parallel unsafe pathkeys