Re: DROPped database doesn't go away Postgres7.4

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joseph Sadove <jsadove(at)beltion(dot)net>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: DROPped database doesn't go away Postgres7.4
Date: 2004-09-01 22:54:11
Message-ID: 11084.1094079251@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Joseph Sadove <jsadove(at)beltion(dot)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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2004-09-01 23:00:33 Re: initdb - (InitPostgres) - FATAL: database "postgres" does not exist
Previous Message Chris Hoover 2004-09-01 21:03:37 Re: Help understanding locale