Backup/Recovery (BR) question

From: Oli Sennhauser <oli(dot)sennhauser(at)bluewin(dot)ch>
To: pgsql-admin(at)postgresql(dot)org
Subject: Backup/Recovery (BR) question
Date: 2003-11-20 16:09:41
Message-ID: 3FBCE745.8070002@bluewin.ch
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

* How can I clean up the database cluster after this scenario?
* Is the database cluster so fare so well ok now for further production
or do we have to dump?

Q2: New situation: Why is it not a good idea to backup the database
files of a cluster incl. all c_log and x_log (log files last) to get a
"physicaly hot backup".
In principle it is the same situation like a server which is crashing
(not a once but during some time). After restoring, it should do a redo
and rollback automatically like after a crash. This methode (physical
hot backup) would increas backup and restore times dramatically.

Thanks for clearing up
Oli

-------------------------------------------------------

Oli Sennhauser
Database-Engineer (Oracle & PostgreSQL)
Rebenweg 6
CH - 8610 Uster / Switzerland

Phone (+41) 1 940 24 82 or Mobile (+41) 79 450 49 14
e-Mail oli(dot)sennhauser(at)bluewin(dot)ch
Website http://mypage.bluewin.ch/shinguz/PostgreSQL/

Secure (signed/encrypted) e-Mail with a Free Personal SwissSign ID: http://www.swisssign.ch

Import the SwissSign Root Certificate: http://swisssign.net/cgi-bin/trust/import

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2003-11-20 17:01:23 Re: RH-PostgreSQL version 7.3.4 is included RHEL 3
Previous Message Andrew Sullivan 2003-11-20 11:29:06 Re: recovering from backup + transaction log