Re: Snapshot management, final

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Pg Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Snapshot management, final
Date: 2008-04-22 23:30:46
Message-ID: 28999.1208907046@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Alvaro Herrera <alvherre(at)commandprompt(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2008-04-23 01:15:49 Re: Snapshot management, final
Previous Message Alvaro Herrera 2008-04-22 22:13:00 Re: Snapshot management, final