Re: Backup/Recovery (BR) question - Mailing list pgsql-admin

From Robert Treat
Subject Re: Backup/Recovery (BR) question
Date
Msg-id 1069352859.10334.11078.camel@camel
Whole thread Raw
In response to Backup/Recovery (BR) question  (Oli Sennhauser <oli.sennhauser@bluewin.ch>)
List pgsql-admin
On Thu, 2003-11-20 at 11:09, Oli Sennhauser wrote:
> Hello dba's
>
> Im playing around with the BR features of PostgreSQL 7.4 for a
> PostgreSQL-BR course.
>
> Q1: Let's imagine, we have a database cluster containing DB1, DB2 and
> DB3. System (disk) crashes and we are only able to recover DB2 (was on a
>
> local disk not on the external like DB1 and DB3). Bring it up again,
> everything is fine...
> But then I want to clean up a little and drop the missing DB's (e.g. to
> install them from scratch):
>
> DB2=# \l
>         List of databases
>    Name    |  Owner   | Encoding
> -----------+----------+-----------
>  DB1       | postgres | SQL_ASCII
>  DB2       | postgres | SQL_ASCII
>  DB3       | postgres | SQL_ASCII
>  template0 | postgres | SQL_ASCII
>  template1 | postgres | SQL_ASCII
> (5 rows)
>
> DB2=# drop database DB1;
> ERROR:  database "db1" does not exist
>

There is an error in your example that I can't determine if it is
intentional or not.  In your above example, your problem is not that
your database doesn't exist, it is that you are not quoting the database
name properly. Note the name of the database is DB1 (uppercase) but the
error message is talking about db1 (lowercase)

If you do  // drop database "DB1" // the first database will drop,
though you might want to verify if it is really damaged.


Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: RH-PostgreSQL version 7.3.4 is included RHEL 3
Next
From: "Sander Steffann"
Date:
Subject: Re: RH-PostgreSQL version 7.3.4 is included RHEL 3