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

From Tom Lane
Subject Re: Snapshot management, final
Date
Msg-id 28999.1208907046@sss.pgh.pa.us
Whole thread Raw
In response to Re: Snapshot management, final  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Snapshot management, final  (Alvaro Herrera <alvherre@commandprompt.com>)
Re: Snapshot management, final  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-patches
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Simon Riggs wrote:
>> OK, so it can;t be copied to a longer lived memory context?

> CopySnapshot always copies snapshots to SnapshotContext, which is a
> context that lives until transaction end.  There's no mechanism for
> copying a snapshot into another context, because I don't see the need.

The only reason we have memory contexts at all is to avoid the need to
track individual palloc'd objects.  Since we're instituting exactly such
tracking for snapshots, there's no value in placing them in
general-purpose memory contexts.

            regards, tom lane

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: Snapshot management, final
Next
From: Alvaro Herrera
Date:
Subject: Re: Snapshot management, final