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 | OS7PR01MB119648203BD748ED008FA5BF5EAABA@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 Pavel-san, >> So maybe there should be ALTER DATABASE ... RENAME ... FORCE - or if FORCE can terminare all workers (without specialFLAG) ? > > 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. > > When I thought about it - there can be a second alternative. > > Introduce a pair of flags BGWORKER_INTERRUPTABLE and BGWORKER_PROTECTED (the names can be enhanced or changed). BGWORKER_INTERRUPTABLEcan be default. > ALTER DATABASE RENAME and related commands can stop any non protected workers. ALTER DATABASE RENAME FORCE can stop anyworkers (including protected). I can't image any use cases for BGWORKER_PROTECTED. Do you have any idea? Also, I think the parameter settings might get a complicated. If we start discussing the "FORCE" option, it is better to think about this parameter. > Is there any reason why BGWORKER_INTERRUPTABLE cannot be default? Probably nobody would block some possibly common operationson database level without strong reason. As Michael-san mentioned in a previous email, this behavior has remained unchanged since bgworkers were introduced in v9.3. I don't see a compelling reason to alter it now. Additionally, this specification can be modified later. Best Regards, Aya Iwata
В списке pgsql-hackers по дате отправления: