pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedDROPped database doesn't go away Postgres7.4
2+ messages / 2 participants
[nested] [flat]
* DROPped database doesn't go away Postgres7.4
@ 2004-09-01 19:58 Joseph Sadove <jsadove@beltion.net>
2004-09-01 22:54 ` Re: DROPped database doesn't go away Postgres7.4 Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 2+ messages in thread
From: Joseph Sadove @ 2004-09-01 19:58 UTC (permalink / raw)
To: pgsql-admin
Hello All,
I cannot “re-create” a database properly.
I did a dump all of one database that runs on production.
I copied the dmp file to dev environment, DROPped the existing database, CREATEd
the database anew and then ran the dump in psql to recreate the database.
The database (and/or db server) seems all scrambled now.
The new database seems unchanged from the one I DROPped.
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.
After I DROP the database, I check that it is indeed gone by trying to psql to
it. An error comes telling me the DB doesn’t exist.
This is extremely bizarre. Any help is vastly appreciated.
Thanks, Joe
The environment, etc. is:
RedHat ES3 (kernel 2.4.21)
Postgres 7.4.2-1 unclustered
--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: DROPped database doesn't go away Postgres7.4
2004-09-01 19:58 DROPped database doesn't go away Postgres7.4 Joseph Sadove <jsadove@beltion.net>
@ 2004-09-01 22:54 ` Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2004-09-01 22:54 UTC (permalink / raw)
To: Joseph Sadove <jsadove@beltion.net>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-09-01 22:54 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-01 19:58 DROPped database doesn't go away Postgres7.4 Joseph Sadove <jsadove@beltion.net>
2004-09-01 22:54 ` Tom Lane <tgl@sss.pgh.pa.us>
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