Re: error in creating database - Mailing list pgsql-general

From Markus Wollny
Subject Re: error in creating database
Date
Msg-id 28011CD60FB1724DBA4442E38277F6264A7167@hermes.computec.de
Whole thread Raw
In response to error in creating database  ("Karthik.S" <skarthik@midascomm.com>)
List pgsql-general
Hi!

> -----Ursprüngliche Nachricht-----
> Von: pgsql-general-owner@postgresql.org
> [mailto:pgsql-general-owner@postgresql.org] Im Auftrag von Karthik.S
> Gesendet: Dienstag, 6. Dezember 2005 13:26
> An: pgsql-general@postgresql.org
> Betreff: [GENERAL] error in creating database
>
> Dear all,
>
>         I am using postgres version: 7.1.3 in Red hat linux : 7.2.

You should really consider upgrading. There has been a lot of development, both feature-wise and concerning
bug-squashing,since the 7.1-days. 

> Sometimes (nearly 50% of the times) the database creation
> fails by saying
> "ERROR:  CREATE DATABASE: source database "template1" is
> being accessed by other users"

8.1 has introduced the concept of a "maintenance-database", but you can easily do something similar by either creating
yourdb's with "CREATE DATABASE foo WITH TEMPLATE = template0;" (but anything you have changed in template1 after
PostgreSQL-installationwon't be in your new db then) or simply create another template-database, say template2 for this
purpose.

Kind regards

   Markus

pgsql-general by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: error in creating database
Next
From: Emil Rachovsky
Date:
Subject: lost in system tables