Re: CREATE DATABASE fails when template1 being accessed ...

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Marc G(dot) Fournier" <scrappy(at)postgresql(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: CREATE DATABASE fails when template1 being accessed ...
Date: 2005-05-31 18:54:26
Message-ID: 20050531185426.GA13127@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, May 31, 2005 at 14:53:41 -0300,
"Marc G. Fournier" <scrappy(at)postgresql(dot)org> wrote:
>
>
> ERROR: source database "template1" is being accessed by other users
>
> Why is this not allowed? Not that there is generally a reason to be in
> template1, but am curious as to why it prevents a new DB from being
> created if someone is connected to it ...

Because if someone changes something in the database while it is being
copied, the newly created database will probably be messed up.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Hannu Krosing 2005-05-31 19:04:24 Re: Deadlock with tsearch2 index ...
Previous Message Tom Lane 2005-05-31 18:49:09 Re: CREATE DATABASE fails when template1 being accessed ...