X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 417CDD1CA65 for ; Thu, 20 Nov 2003 18:28:23 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 85886-06 for ; Thu, 20 Nov 2003 14:27:53 -0400 (AST) Received: from bramble.mmrd.com (unknown [65.217.53.66]) by svr1.postgresql.org (Postfix) with ESMTP id 17939D1CA63 for ; Thu, 20 Nov 2003 14:27:52 -0400 (AST) Received: from thorn.mmrd.com (thorn.mmrd.com [172.25.10.100]) by bramble.mmrd.com (8.12.8/8.12.8) with ESMTP id hAKHYJcM032423; Thu, 20 Nov 2003 12:34:19 -0500 Received: from gnvex001.mmrd.com (gnvex001.mmrd.com [192.168.3.55]) by thorn.mmrd.com (8.11.6/8.11.6) with ESMTP id hAKIRdl19386; Thu, 20 Nov 2003 13:27:39 -0500 Received: from camel.mmrd.com ([172.25.5.213]) by gnvex001.mmrd.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id V3JR4S90; Thu, 20 Nov 2003 13:27:35 -0500 Subject: Re: Backup/Recovery (BR) question From: Robert Treat To: Oli Sennhauser Cc: pgsql-admin@postgresql.org In-Reply-To: <3FBCE745.8070002@bluewin.ch> References: <3FBCE745.8070002@bluewin.ch> Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Mailer: Ximian Evolution 1.0.8 Date: 20 Nov 2003 13:27:38 -0500 Message-Id: <1069352859.10334.11078.camel@camel> Mime-Version: 1.0 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200311/370 X-Sequence-Number: 11357 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