From: | Simon Riggs <simon(at)2ndquadrant(dot)com> |
---|---|
To: | Gregory Stark <stark(at)enterprisedb(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Transaction Snapshot Cloning |
Date: | 2008-01-20 19:31:41 |
Message-ID: | 1200857501.4255.549.camel@ebony.site |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Sun, 2008-01-20 at 15:11 +0000, Gregory Stark wrote:
> "Simon Riggs" <simon(at)2ndquadrant(dot)com> writes:
>
> > On Sat, 2008-01-12 at 18:46 +0000, Gregory Stark wrote:
> >
> >> To do something like that the user would have to create a prepared transaction
> >> to save the snapshot. I think that makes sense though since effectively it's
> >> just requiring that the user explicitly do what would otherwise be a hidden
> >> implicit requirement -- that the user do something to hold globalxmin back to
> >> avoid having the snapshots expire.
> >
> > This is a good idea which I will want to develop in the future, not yet
> > though.
>
> I didn't mean this as an additional feature. I'm talking about how users would
> use the two very different proposed interfaces.
>
> In your version the user can save the actual snapshot somewhere and then use
> it later. He'll presumably get an error if the snapshot is no longer usable
> and there's no way for him to protect it and guarantee it's still usable.
>
> In Tom's version the user can only copy the snapshot from some other running
> session. It's necessarily still valid because the session is using it. But if
> the user wants to save it for later he'll have to create a session (or
> prepared transaction) to hold the snapshot.
OK, misunderstanding. "My version" is being done now, so we can use it
now; it will be published as BSD licenced open source software, but as
yet seems unlikely to ever be part of a main distribution of Postgres.
It will probably be published on pgfoundry, though possibly elsewhere
also. I don't take credit for the general idea, but I am responsible for
the idea to do this now as an external function.
I prefer this done in the backend in the long term, much safer, which we
are agreed upon. I'll come back to that so we get it into 8.4.
--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2008-01-20 19:41:41 | Re: Friendly help for psql |
Previous Message | Tom Lane | 2008-01-20 19:08:42 | Re: Friendly help for psql |