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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: "Hayato Kuroda (Fujitsu)" <kuroda(dot)hayato(at)fujitsu(dot)com>
Cc: 'Andrei Lepikhov' <lepihov(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, "Aya Iwata (Fujitsu)" <iwata(dot)aya(at)fujitsu(dot)com>, 'Chao Li' <li(dot)evan(dot)chao(at)gmail(dot)com>, Peter Smith <smithpb2250(at)gmail(dot)com>
Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date: 2025-10-16 03:37:01
Message-ID: aPBoXXW3XuwiIsHG@paquier.xyz
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 14, 2025 at 04:36:01AM +0000, Hayato Kuroda (Fujitsu) wrote:
>> The only question I have is whether to
>> make sending a termination signal a default behaviour and let the flag
>> deactivate it.
>
> I think it can be done in future enhancement.
> We can change the default behavior based on the feedback from developers.

Yeah, I cannot agree with a change in the default behavior to cancel
the workers on a database touched by a database command. This is a
behavior that exists since bgworkers are supported in tree in 9.3. If
one is interested in making the workers more responsive, they could
just flip the flag switch.
--
Michael

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2025-10-16 03:54:31 Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Previous Message Fujii Masao 2025-10-16 03:31:57 Re: Extend documentation for pg_stat_replication.backend_xmin