dbTalk Databases Forums  

[BUGS] drop + create database restores previous tables and data

mailing.database.pgsql-bugs mailing.database.pgsql-bugs


Discuss [BUGS] drop + create database restores previous tables and data in the mailing.database.pgsql-bugs forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Douglas Toltzman
 
Posts: n/a

Default [BUGS] drop + create database restores previous tables and data - 05-22-2005 , 01:37 PM






I just installed Postgres v 8.0.3. I loaded by databases, then decided
to reload a database. I dropped the database with dropdb (I also tried
DROP DATABASE in pgsql), then I recreated the database with createdb.
When I tried to reload the data from the database dump, I got errors
because the relations and data were already in the newly created
database. I've since tried dropping and recreating several times.
After dropping and creating, I can connect to the database and see all
of the data that was there before dropping the database; without
reloading anything.

At this early stage, I can remove everything and recreate the entire
installation from scratch, but this will create a real problem in the
future.

Douglas Toltzman, Oak Street Software, Inc.
voice: 910-526-5938
http://www.oakstreetsoftware.com/


---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Reply With Quote
  #2  
Old   
John Hansen
 
Posts: n/a

Default Re: [BUGS] drop + create database restores previous tables and data - 05-22-2005 , 02:36 PM






Maybe you restored to template1 by mistake?=20

Quote:
-----Original Message-----
From: pgsql-bugs-owner (AT) postgresql (DOT) org=20
[mailtogsql-bugs-owner (AT) postgresql (DOT) org] On Behalf Of Douglas Toltzman
Sent: Monday, May 23, 2005 4:38 AM
To: pgsql-bugs (AT) postgresql (DOT) org
Subject: [BUGS] drop + create database restores previous=20
tables and data
=20
I just installed Postgres v 8.0.3. I loaded by databases,=20
then decided to reload a database. I dropped the database=20
with dropdb (I also tried DROP DATABASE in pgsql), then I=20
recreated the database with createdb.=20=20
When I tried to reload the data from the database dump, I got=20
errors because the relations and data were already in the=20
newly created database. I've since tried dropping and=20
recreating several times.=20=20
After dropping and creating, I can connect to the database=20
and see all of the data that was there before dropping the=20
database; without reloading anything.
=20
At this early stage, I can remove everything and recreate the=20
entire installation from scratch, but this will create a real=20
problem in the future.
=20
Douglas Toltzman, Oak Street Software, Inc.
voice: 910-526-5938
http://www.oakstreetsoftware.com/
=20
=20
---------------------------(end of=20
broadcast)---------------------------
TIP 8: explain analyze is your friend
=20
=20
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo (AT) postgresql (DOT) org


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.