Re: Backup/Recovery (BR) question

From: Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>
To: Oli Sennhauser <oli(dot)sennhauser(at)bluewin(dot)ch>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Backup/Recovery (BR) question
Date: 2003-11-20 18:27:38
Message-ID: 1069352859.10334.11078.camel@camel
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Sander Steffann 2003-11-20 20:32:50 Re: RH-PostgreSQL version 7.3.4 is included RHEL 3
Previous Message Andrew Sullivan 2003-11-20 18:24:32 Re: Point-in-time data recovery - v.7.4