From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andy Shellam (Mailing Lists) <andy.shellam-lists@mailnetwork.co.uk>
Cc: pgsql-admin@postgresql.org
Subject: Re: Recovering a deleted database problem
Date: Fri, 05 Jan 2007 10:08:59 -0500
Message-ID: <15671.1168009739@sss.pgh.pa.us> (raw)
In-Reply-To: <459E32DC.3030402@mailnetwork.co.uk>
References: <459E32DC.3030402@mailnetwork.co.uk>
"Andy Shellam (Mailing Lists)" <andy.shellam-lists@mailnetwork.co.uk> writes:
> (Note, after writing this, I tried restoring to a minute earlier (ie.
> 18:57:40) and still have the same problem.
The PITR recovery process in effect rolls forward until it finds
a transaction-commit record >= the specified time. Now for normal
database operations, stopping just short of the commit of the
transaction is enough to ensure that the transaction has no effect.
But for the XLOG_DBASE_DROP record, not so --- replaying that means
"rm -rf base/whatever". So you've got to make sure the replay stops
before it reaches that record, and that means you need a stop time
<= the commit time of some *prior* transaction. I suppose this was
a slow time of day and you didn't have any other commits in the prior
minute :-( ... so take another look in the log and see what was the
last commit before that, and use that time.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, andy.shellam-lists@mailnetwork.co.uk
Subject: Re: Recovering a deleted database problem
In-Reply-To: <15671.1168009739@sss.pgh.pa.us>
References: <459E32DC.3030402@mailnetwork.co.uk> <15671.1168009739@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox