From: | Alvaro Herrera <alvherre(at)commandprompt(dot)com> |
---|---|
To: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
Cc: | Hannu Krosing <hannu(at)skype(dot)net>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, Chad Wagner <chad(dot)wagner(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, RPK <rohitprakash123(at)indiatimes(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: New feature request: FlashBack Query |
Date: | 2007-02-19 14:27:31 |
Message-ID: | 20070219142731.GA28110@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Florian G. Pflug escribió:
> Hannu Krosing wrote:
> >Ühel kenal päeval, P, 2007-02-18 kell 14:27, kirjutas Joshua D. Drake:
> >>Hannu Krosing wrote:
> >>>Ühel kenal päeval, L, 2007-02-17 kell 22:49, kirjutas Chad Wagner:
> >>>To get a flashback query, you "just" have to construct a snapshot from
> >>>that time and you are done. We don't store transaction times anywere, so
> >>>the flashback has to be by transaction id, but there is very little
> >>>extra work involved. We just don't have syntax for saying "SELECT ... AS
> >>>SEEN BY TRANSACTION XXX"
> >>Well this is certainly interesting. What do we think it would take to
> >>enable the functionality?
> >
> >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
> >
> >probably it is a good idea to take a lock on all tables involved to
> >avoid a vacuum to be started on them when the query is running.
> Would the xmin exported by that transaction prevent vacuum from removing
> any tuples still needed for the flashback snapshot?
Sure, and that makes the mentioned lock unnecessary.
--
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
From | Date | Subject | |
---|---|---|---|
Next Message | Zeugswetter Andreas ADI SD | 2007-02-19 14:32:36 | Re: New feature request: FlashBack Query |
Previous Message | Florian G. Pflug | 2007-02-19 14:14:22 | Re: New feature request: FlashBack Query |