From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Pgsql Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Problem with "create database ... with template " |
Date: | 2007-05-09 19:20:27 |
Message-ID: | Pine.LNX.4.64.0705092313280.12152@sn.sai.msu.ru |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Wed, 9 May 2007, Tom Lane wrote:
> Oleg Bartunov <oleg(at)sai(dot)msu(dot)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.
I tried that connecting to template1, but it doesn't helped. The problem
occurs even if I repeat 'drop;create' in one connection (the same backend).
connect
while true do
drop database
create database with template
end
disconnect
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, Research Scientist, Head of AstroNet (www.astronet.ru)
Sternberg Astronomical Institute, Moscow University, Russia
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(495)939-16-83, +007(495)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2007-05-09 20:02:29 | Re: Problem with "create database ... with template " |
Previous Message | Tom Lane | 2007-05-09 19:18:12 | Re: [PERFORM] Cannot make GIN intarray index be used by the planner |