[postgis-users] Restore of DB failing

Markus Schaber schabi at logix-tt.com
Tue Sep 19 02:25:05 PDT 2006


Hi, Tim,

Tim De Chant wrote:

> createdb: database creation failed: ERROR:  source database "template1"
> is being accessed by other users

PostgreSQL tries the template1 database by default when creating a new
database. However, this won't work when there are any connections to
that database (other than the one issuing createdb itsself).

Especially, tools like PGAdmin tend to have a persistent connection to
the template1 database (to fetch the list of available databases and
other metadata), that's why newer PostgreSQL have an extra, empty
"postgres" database just for those tools to connect.

It may also be that the autovacuum daemon has a connection open.

So make sure that there are no other tools accessing the template1
database, and it should work fine.

HTH,
Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in Europe! www.ffii.org
www.nosoftwarepatents.org



More information about the postgis-users mailing list