RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
| От | Aya Iwata (Fujitsu) |
|---|---|
| Тема | RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE |
| Дата | |
| Msg-id | OS7PR01MB119647141272DBF9364A1C5AAEAADA@OS7PR01MB11964.jpnprd01.prod.outlook.com обсуждение исходный текст |
| Ответ на | Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE (Pavel Stehule <pavel.stehule@gmail.com>) |
| Ответы |
Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
|
| Список | pgsql-hackers |
Hi Thank you for your review. > From: Pavel Stehule <pavel.stehule@gmail.com> > Sent: Sunday, December 14, 2025 4:40 PM > To: Michael Paquier <michael@paquier.xyz> > Cc: Iwata, Aya/岩田 彩 <iwata.aya@fujitsu.com>; Peter Smith <smithpb2250@gmail.com>; Chao Li <li.evan.chao@gmail.com>; Kuroda,Hayato/黒田 隼人 <kuroda.hayato@fujitsu.com>; pgsql-hackers <pgsql-hackers@postgresql.org> > Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE > > +#define BGWORKER_EXIT_AT_DATABASE_CHANGE 0x0004 > > I am checking this patch, and I think so used names can be little bit confusing > > BGWORKER_EXIT_AT_DATABASE_CHANGE - it is used for disconnecting workers on the template database, and this database isnot changing. > > TerminateBgWorkersByDbOid - it doesn't terminate all workers, but only workers with some special flags > > Maybe BGWORKER_INTERRUPTABLE and TerminateInterruptableBgWorkersByDbOid ? Thank you for your advice. I changed the name of a function and a flag. > Another question is if this cancellation should be implicit and should not require some special flag. > > When I want to disconnect connections to database when I do drop, I have to use FORCE flag > > So maybe there should be ALTER DATABASE ... RENAME ... FORCE - or if FORCE can terminare all workers (without special FLAG)? For the proposed feature, we've added a flag allowing each extension developer to decide whether to terminate it via DROP/ALTERDATABASE. Adding a FORCE option to ALTER to let database definition modifiers decide whether to force termination of background workersmight be better discussed in a separate thread. Best Regards, Aya Iwata
Вложения
В списке pgsql-hackers по дате отправления: