public inbox for [email protected]
help / color / mirror / Atom feedFrom: Hayato Kuroda (Fujitsu) <[email protected]>
To: 'Michael Paquier' <[email protected]>
Cc: Aya Iwata (Fujitsu) <[email protected]>
Cc: pgsql-hackers <[email protected]>
Subject: RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Date: Mon, 6 Oct 2025 09:15:53 +0000
Message-ID: <OSCPR01MB14966398C6CBD069426899B5EF5E3A@OSCPR01MB14966.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <[email protected]>
References: <OS7PR01MB11964335F36BE41021B62EAE8EAE4A@OS7PR01MB11964.jpnprd01.prod.outlook.com>
<OSCPR01MB149662AEA64F4E66F494C2584F5E3A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
<[email protected]>
Dear Michael,
> The main take that I am getting here from Iwata-san is that this would
> lead to less code duplication. Another item, which you are not
> mentioning, is that this would be more flexible with bgworkers that
> have been starting dynamically, where shared_preload_libraries may not
> be used, still a bgworker would need to react. So the suggestion of a
> new API to control if a bgworker should be stopped like any other
> backend when there is a database activity worth it is a good one, as
> long as it is in line with what we do with normal backends.
Okay, so this proposal has the advantage that we can terminate workers, even if the
extensions do not control workers on the shared memory, right?
> AcceptBackgroundWorkerCancel() is going backwards, IMO. Wouldn't it
> be better to pass it down as an option in bgw_flags, to mark that a
> bgworker connected to a database can be shutdown due to the effect of
> a database getting dropped or moved?
+1 to extend the bgw_flags.
Best regards,
Hayato Kuroda
FUJITSU LIMITED
view thread (67+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
In-Reply-To: <OSCPR01MB14966398C6CBD069426899B5EF5E3A@OSCPR01MB14966.jpnprd01.prod.outlook.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox