Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Patches > Re: Snapshot ma...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 5 Topic 3621 of 3877
Post > Topic >>

Re: Snapshot management, final

by simon@[EMAIL PROTECTED] (Simon Riggs) Apr 22, 2008 at 10:58 PM

On Tue, 2008-04-22 at 17:50 -0400, Alvaro Herrera wrote:
> Simon Riggs wrote:
> > On Tue, 2008-04-22 at 15:49 -0400, Alvaro Herrera wrote:
> > 
> > > - Three CopySnapshot call sites remain outside snapmgr.c: DoCopy()
on
> > > copy.c, ExplainOnePlan() on explain.c and _SPI_execute_plan() on
spi.c.
> > > They are there because they grab the current ActiveSnapshot, modify
it,
> > > and then use the resulting snapshot.  There is no corresponding
> > > FreeSnapshot, because it's not needed.
> > 
> > Not needed? How can we be certain that the modified snapshot does not
> > outlive its original source?
> 
> It's not CopySnapshot that's not needed, but FreeSnapshot.  The point
> here is that the snapshot will be freed automatically as soon as it is
> PopActiveSnapshot'd out of existance.  CopySnapshot creates a new,
> separate copy of the passed snapshot, and each of them will be freed
> (separately) as soon as their refcounts reach zero.

OK, so it can;t be copied to a longer lived memory context?

-- 
  Simon Riggs
  2ndQuadrant  http://www.2ndQuadrant.com


-- 
Sent via pgsql-patches mailing list (pgsql-patches@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-patches
 




 5 Posts in Topic:
Re: Snapshot management, final
simon@[EMAIL PROTECTED]   2008-04-22 22:58:38 
Re: Snapshot management, final
alvherre@[EMAIL PROTECTED  2008-04-22 18:13:00 
Re: Snapshot management, final
tgl@[EMAIL PROTECTED] (T  2008-04-22 19:30:46 
Re: Snapshot management, final
alvherre@[EMAIL PROTECTED  2008-04-22 21:15:49 
Re: Snapshot management, final
alvherre@[EMAIL PROTECTED  2008-04-23 08:24:36 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Wed Jul 9 0:13:57 CDT 2008.