Re: Problem with "create database ... with template "

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Problem with "create database ... with template "
Дата
Msg-id 29215.1178735514@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Problem with "create database ... with template "  (Oleg Bartunov <oleg@sai.msu.su>)
Ответы Re: Problem with "create database ... with template "  (Andrew Dunstan <andrew@dunslane.net>)
Re: Problem with "create database ... with template "  (Oleg Bartunov <oleg@sai.msu.su>)
Список pgsql-hackers
Oleg Bartunov <oleg@sai.msu.su> writes:
> I'm investigating a problem my client experienced with 
> "create database xxx with template=yyy" - they often get error
> "ERROR:  source database "yyy" is being accessed by other users",

Your test case simply shows that it takes a finite amount of time for
the previous backend to exit; depending on scheduler priorities it's
possible for the next instance to connect and try to CREATE DATABASE
before the previous one is gone.  My suggestion would be to connect
to some other database besides the one being copied.
        regards, tom lane


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

Предыдущее
От: Oleg Bartunov
Дата:
Сообщение: Problem with "create database ... with template "
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Problem with "create database ... with template "