Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Дата
Msg-id aVyfvgMplnc6aIE2@paquier.xyz
обсуждение исходный текст
Ответ на Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE  (Peter Smith <smithpb2250@gmail.com>)
Список pgsql-hackers
On Tue, Jan 06, 2026 at 08:18:39AM +1100, Peter Smith wrote:
> This did not seem like the correct fix for my previous review comment
> [1, comment #3], because the autovacuum backends are still killed with
> SIGTERM, right?

Yes, you are right that this creates a confusing mix.  Bgworkers have
no relationship with SIGTERM in this code.  I have added a sentence to
document the new behavior for interruptible bgworkers, after the
existing ones.  One thing that was also missing is the fact that the
wait can be shortened with the injection point.

> 2.
> +# Confirm that the non-interruptible bgworker is still running.
> +my $result = $node->safe_psql(
> + "postgres", qq(
> +        SELECT count(1) FROM pg_stat_activity
> + WHERE backend_type = 'worker_spi dynamic';));
>
> The indentation of the "SELECT" still does not look correct to me. Did
> you run pgperltidy on this file?

perltidy is happy with that, because it considers the string within
the quoted qq() area as something fine.  At the end this is just a tab
vs whitespace issue, you are right that this should use whitespaces.

I have done a couple of test runs in the CI to be sure, and noticed no
instability in the tests, so applied.  I'll keep an eye on the CFbot
and the buildfarm for the next few days.
--
Michael

Вложения

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