Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (Postfix) with ESMTP id EAA16475484 for ; Wed, 3 Apr 2002 20:45:33 -0500 (EST) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.5.2) with HTTP id 847066; Wed, 03 Apr 2002 17:45:35 -0800 From: "Josh Berkus" Subject: Re: Cleaning up template 1 -> template0 cloning To: Thomas Good , Josh Berkus Cc: pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.5.2 Date: Wed, 03 Apr 2002 17:45:35 -0800 Message-ID: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200204/44 X-Sequence-Number: 7309 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