atom feed44 messages in org.postgresql.pgsql-hackersRe: New feature request: FlashBack Query
FromSent OnAttachments
RPKFeb 17, 2007 6:49 am 
Joshua D. DrakeFeb 17, 2007 7:50 am 
Tom LaneFeb 17, 2007 8:48 am 
eleinFeb 17, 2007 4:06 pm 
Chad WagnerFeb 17, 2007 4:43 pm 
Joshua D. DrakeFeb 17, 2007 7:21 pm 
Chad WagnerFeb 17, 2007 7:49 pm 
Tom LaneFeb 17, 2007 9:31 pm 
Warren TurkalFeb 17, 2007 10:46 pm 
Hannu KrosingFeb 18, 2007 1:45 pm 
Joshua D. DrakeFeb 18, 2007 2:27 pm 
Andreas 'ads' ScherbaumFeb 19, 2007 1:53 am 
Hannu KrosingFeb 19, 2007 4:36 am 
Florian G. PflugFeb 19, 2007 6:13 am 
Alvaro HerreraFeb 19, 2007 6:27 am 
Zeugswetter Andreas ADI SDFeb 19, 2007 6:32 am 
Zeugswetter Andreas ADI SDFeb 19, 2007 6:38 am 
Florian G. PflugFeb 19, 2007 6:59 am 
Gregory StarkFeb 19, 2007 7:18 am 
tom...@tuxteam.deFeb 19, 2007 8:18 am 
August ZajoncFeb 19, 2007 10:09 am 
Florian G. PflugFeb 19, 2007 11:30 am 
August ZajoncFeb 19, 2007 12:00 pm 
Tom LaneFeb 19, 2007 7:39 pm 
Jonah H. HarrisFeb 19, 2007 8:53 pm 
Gregory StarkFeb 20, 2007 12:58 am 
RPKFeb 20, 2007 3:25 am 
Andrew DunstanFeb 20, 2007 4:42 am 
Jonah H. HarrisFeb 20, 2007 7:19 am 
Rod TaylorFeb 20, 2007 7:42 am 
Hannu KrosingFeb 20, 2007 8:02 am 
Gregory StarkFeb 20, 2007 8:28 am 
August ZajoncFeb 20, 2007 8:39 am 
RPKFeb 20, 2007 10:27 am 
Tom LaneFeb 20, 2007 10:40 am 
Theo SchlossnagleFeb 20, 2007 10:45 am 
Jonah H. HarrisFeb 20, 2007 11:48 am 
Jonah H. HarrisFeb 20, 2007 12:03 pm 
August ZajoncFeb 20, 2007 7:30 pm 
Csaba NagyFeb 21, 2007 1:17 am 
Florian G. PflugFeb 21, 2007 6:01 am 
Alvaro HerreraFeb 21, 2007 6:13 am 
Florian G. PflugFeb 21, 2007 7:08 am 
August ZajoncMar 1, 2007 9:48 am 
Subject:Re: New feature request: FlashBack Query
From:Gregory Stark (sta@enterprisedb.com)
Date:Feb 19, 2007 7:18:36 am
List:org.postgresql.pgsql-hackers

"Zeugswetter Andreas ADI SD" <Zeug@spardat.at> writes:

First we must run the query in serializable mode and replace the snapshot with a synthetic one, which defines visibility at the start of the desired transaction

We could use something that controls "global xmin". It would ensure, that global xmin does not advance bejond what still needs to be visible. This would probably be a sliding time window, or a fixed point in time that is released by the dba/user.

Well there's another detail you have to cover aside from rolling back your xmin. You have to find the rest of the snapshot including knowing what other transactions were in-progress at the time you want to flash back to.

If you just roll back xmin and set xmax to the same value you'll get a consistent view of the database but it may not match a view that was ever current. That is, some of the transactions after the target xmin may have committed before that xmin. So there was never a time in the database when they were invisible but your new xmin was visible.

I think to do this you'll need to periodically record a snapshot and then later restore one of those saved snapshots. Not sure where would be a good place to record them. The WAL seems like a handy place but digging through the WAL would be annoying.

Incidentally this is one of the things that would be useful for read-only access to PITR warm standby machines.