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