Home > Archive > PostgreSQL Bugs > May 2005 > drop + create database restores previous tables and data









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author drop + create database restores previous tables and data
Douglas Toltzman

2005-05-22, 1:23 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

John Hansen

2005-05-22, 8:24 pm

Maybe you restored to template1 by mistake?

> -----Original Message-----
> From: pgsql-bugs-owner@postgresql.org
> [mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Douglas Toltzman
> Sent: Monday, May 23, 2005 4:38 AM
> To: pgsql-bugs@postgresql.org
> Subject: [BUGS] drop + create database restores previous
> tables and data
>
> 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
>
>


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql
.org

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com