From: Josh Berkus <josh@agliodbs.com>
To: Thomas Good <tomg@admin.nrnet.org>
To: Josh Berkus <josh@agliodbs.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Cleaning up template 1 -> template0 cloning
Date: Wed, 03 Apr 2002 17:45:35 -0800
Message-ID: <web-847066@davinci.ethosmedia.com> (raw)
In-Reply-To: <Pine.LNX.4.05.10203251559460.12541-100000@admin.nrnet.org>
Thomas, folks,
> Note: template1 and template0 do not have any special status
> beyond
> the fact that the name template1 is the default source database
> name for CREATE DATABASE and the default database-to-connect-to
> for
> various scripts such as createdb. For example, one could drop
> template1 and recreate it from template0 without any ill
> effects.
> This course of action might be advisable if one has carelessly
> added a bunch of junk in template1.
Help! The above documentation seems to be incorrect.
If I try to connect to Template0:
psql: FATAL 1: Database "template0" is not currently accepting
connections
If I try to drop template1 from psql:
ERROR: DROP DATABASE: database is marked as a template
If I try "dropdb template1":
ERROR: DROP DATABASE: cannot be executed on the currently open
database
dropdb: database removal failed
Trying to remove template1 to restore it using an undamaged template0
seems to be a catch-22 with no way out. Help!
-Josh Berkus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: josh@agliodbs.com, tomg@admin.nrnet.org
Subject: Re: Cleaning up template 1 -> template0 cloning
In-Reply-To: <web-847066@davinci.ethosmedia.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox