Re: Snapshot management, final - Mailing list pgsql-patches

From Alvaro Herrera
Subject Re: Snapshot management, final
Date
Msg-id 20080423122106.GA4768@alvh.no-ip.org
Whole thread Raw
In response to Re: Snapshot management, final  (Simon Riggs <simon@2ndquadrant.com>)
Responses Re: Snapshot management, final  (Simon Riggs <simon@2ndquadrant.com>)
List pgsql-patches
Simon Riggs wrote:
> On Tue, 2008-04-22 at 18:13 -0400, Alvaro Herrera wrote:
> > Simon Riggs wrote:
> >
> > > OK, so it can;t be copied to a longer lived memory context?
> >
> > If you need that ability, please explain.
>
> No, I wish to prevent that, not enable it.

I see.  Sure, we don't have that problem.  In fact, we didn't have it
before either, so I'm not sure I see your point :-)

> Perhaps put the TransactionId on each snapshot and then an Assert can
> check it before its used.

There's no need for that -- all snapshots go away at transaction end.
An attempt to use one would cause a prompt crash (at least on an
assert-enabled build.)

--
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support

pgsql-patches by date:

Previous
From: H.Harada
Date:
Subject: temporal version of generate_series()
Next
From: Alvaro Herrera
Date:
Subject: Re: Snapshot management, final