Skip site navigation (1) Skip section navigation (2)

Re: Creating database problem

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Creating database problem
Date: 2004-10-29 11:05:11
Message-ID: 20041029130511.H624@hermes.hilbert.loc (view raw, whole thread or download thread mbox)
Lists: pgsql-general
> When I try to execute "CREATE DATABASE somename" while connected to 
> database template1 as a non-superuser with createdb-rights, I get the 
> error message "source database "template1" is being accessed by other 
> users". This is correct, as I'm connected to the same server using 
> pgAdmin III on a different PC. But my question is, why this error 
> message? I understand that I need to be using at least _some_ database 
> in other to connect. But why can I only create a new database (which, as 
> far as I know, has nothing to do with template1 itself)
"Create database" does have to do with template1. Template1 is
used as the template for the new database ;-)

> if I'm the only 
> connected user? Or am I missing something? I do need to be able to 
> create databases while other users are connected.
Sure, but not while they are connected to template1. There is
no real reason that I know of why ordinary users should be
connected to template1 for any significant amount of time.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

In response to

pgsql-general by date

Next:From: Greg Sabino MullaneDate: 2004-10-29 11:22:56
Subject: Re: Sorting street addresses
Previous:From: Michael ShtelmaDate: 2004-10-29 10:42:17
Subject: PostgreSQL on Windows

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group