RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
От | Hayato Kuroda (Fujitsu) |
---|---|
Тема | RE: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE |
Дата | |
Msg-id | OSCPR01MB1496614832F8014EC16FB78D2F5EEA@OSCPR01MB14966.jpnprd01.prod.outlook.com обсуждение исходный текст |
Ответ на | Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE (Michael Paquier <michael@paquier.xyz>) |
Ответы |
Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
|
Список | pgsql-hackers |
Dear Michael, > > Sorry for posting many times. I noticed that CountOtherDBBackends() can be > called > > while creating the database. Should we also mention and test the case? > > How would you test that? A bgworker would not be able to connect to > the database that's being created. > Sorry for missing words. Per my understanding, CountOtherDBBackends() in createdb() ensures that there are no active connections of the source database. If there is a connection to a database, we cannot create another database with TEMPALATE clause: ``` postgres=# CREATE DATABASE new TEMPLATE postgres ; ERROR: source database "postgres" is being accessed by other users DETAIL: There is 1 other session using the database. ``` Based on that, I imagined that we could launch a bgworker and create another database by using template. Or is it already handled? Best regards, Hayato Kuroda FUJITSU LIMITED
В списке pgsql-hackers по дате отправления: