Re: Recovering a deleted database problem - Mailing list pgsql-admin

From Tom Lane
Subject Re: Recovering a deleted database problem
Date
Msg-id 15671.1168009739@sss.pgh.pa.us
Whole thread Raw
In response to Recovering a deleted database problem  ("Andy Shellam (Mailing Lists)" <andy.shellam-lists@mailnetwork.co.uk>)
Responses Re: Recovering a deleted database problem  ("Andy Shellam (Mailing Lists)" <andy.shellam-lists@mailnetwork.co.uk>)
List pgsql-admin
"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

pgsql-admin by date:

Previous
From: "Andy Shellam (Mailing Lists)"
Date:
Subject: Re: Connectionstring
Next
From: "Andy Shellam (Mailing Lists)"
Date:
Subject: Re: Connectionstring