Re: libpq CREATE DATABASE operation from multiple treads

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: libpq CREATE DATABASE operation from multiple treads
Дата
Msg-id 2624889.1602189369@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: libpq CREATE DATABASE operation from multiple treads  (p.sun.fun@gmail.com)
Ответы Re: libpq CREATE DATABASE operation from multiple treads  (p.sun.fun@gmail.com)
Список pgsql-sql
p.sun.fun@gmail.com writes:
> Indeed, this is a FATAL_ERROR. From two threads I got:
> // Thread #1
> FATAL_ERROR: ERROR:  source database "template1" is being accessed by
> other users
> DETAIL:  There is 1 other session using the database.

You'd be better off to connect to some other database than template1;
not only just for this purpose, but in general.  If you are issuing
random commands in template1, there's a risk of modifying that database
unexpectedly and thereby changing the contents of databases created
in future.

            regards, tom lane



В списке pgsql-sql по дате отправления:

Предыдущее
От: Rob Sargent
Дата:
Сообщение: Re: libpq CREATE DATABASE operation from multiple treads
Следующее
От: p.sun.fun@gmail.com
Дата:
Сообщение: Re: libpq CREATE DATABASE operation from multiple treads