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