Reputation: 2505
I'm new to the Postgres Point-in-Time recovery feature and I understand how I can use the WAL to recover up to a certain point in time from a fresh database, but I was wondering if it could be used to go BACKWARDS as well.
A -- B -- C
\
Say I'm here and want to drop all the changes between B and C
Is this possible?
Upvotes: 2
Views: 2517
Reputation: 324455
In PostgreSQL the new pg_rewind
feature does just this. It's not yet exposed as a general purpose way to do PITR backwards in time, but as far as I know there's no reason that should not become possible later.
At the moment, no, there is no general purpose way to just replay WAL backwards.
You'll want to restore a base backup of A
, then configure a recovery.conf
to stop recovery at B
.
Upvotes: 2