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
Ответ на
Список
Дерево обсуждения
libpq CREATE DATABASE operation from multiple treads p.sun.fun@gmail.com
Re: libpq CREATE DATABASE operation from multiple treads Tom Lane <tgl@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 Tom Lane <tgl@sss.pgh.pa.us>
Re: libpq CREATE DATABASE operation from multiple treads Dmitry Igrishin <dmitigr@gmail.com>
Re: libpq CREATE DATABASE operation from multiple treads p.sun.fun@gmail.com
Re: libpq CREATE DATABASE operation from multiple treads Tom Lane <tgl@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 Tom Lane <tgl@sss.pgh.pa.us>
Re: libpq CREATE DATABASE operation from multiple treads Rob Sargent <robjsargent@gmail.com>
Re: libpq CREATE DATABASE operation from multiple treads p.sun.fun@gmail.com
Re: libpq CREATE DATABASE operation from multiple treads Rob Sargent <robjsargent@gmail.com>
Re: libpq CREATE DATABASE operation from multiple treads p.sun.fun@gmail.com
Re: libpq CREATE DATABASE operation from multiple treads Rob Sargent <robjsargent@gmail.com>
Re: libpq CREATE DATABASE operation from multiple treads Tom Lane <tgl@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 Guillaume Lelarge <guillaume@lelarge.info>
Re: libpq CREATE DATABASE operation from multiple treads p.sun.fun@gmail.com
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
Дата:
От: p.sun.fun@gmail.com
Дата:
FAQ