Re: DROPped database doesn't go away Postgres7.4 - Mailing list pgsql-admin

From Tom Lane
Subject Re: DROPped database doesn't go away Postgres7.4
Date
Msg-id 11084.1094079251@sss.pgh.pa.us
Whole thread Raw
In response to DROPped database doesn't go away Postgres7.4  (Joseph Sadove <jsadove@beltion.net>)
List pgsql-admin
Joseph Sadove <jsadove@beltion.net> writes:
> When I DROP it again and just re- CREATE it, without doing anything, all the
> schemas and objects are there as if I never dropped it.

It sounds to me like you have put a bunch of junk into the template1
database.  This was a bad move :-(.  What you can do as far as restoring
your old database goes is to create your new database using template0
instead of template1 as the source.  See
http://www.postgresql.org/docs/7.4/static/manage-ag-templatedbs.html

In the longer term, you might want to go back to a pristine template1.
It's possible to drop template1 and recreate it from template0, but
there are some gotchas to dodge.  Look up the detailed description
of how to do it at techdocs.postgresql.org --- I don't have the exact
URL at hand.

            regards, tom lane

pgsql-admin by date:

Previous
From: Seamus Ryan
Date:
Subject: initdb - (InitPostgres) - FATAL: database "postgres" does not exist
Next
From: Tom Lane
Date:
Subject: Re: Runtime config of PGSQL