Re: Recovering a deleted database problem

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andy Shellam (Mailing Lists)" <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)uk>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Recovering a deleted database problem
Date: 2007-01-05 15:08:59
Message-ID: 15671.1168009739@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

"Andy Shellam (Mailing Lists)" <andy(dot)shellam-lists(at)mailnetwork(dot)co(dot)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

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Andy Shellam (Mailing Lists) 2007-01-05 15:19:41 Re: Connectionstring
Previous Message Andy Shellam (Mailing Lists) 2007-01-05 14:24:57 Re: Connectionstring