On Sun, 2008-01-20 at 15:11 +0000, Gregory Stark wrote:
> "Simon Riggs" <simon@2ndquadrant.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