Alvaro Herrera wrote:
> In the previous installment,
> I was wondering whether the tracking of snapshots could be made more
> robust by having ActiveSnapshot be some sort of stack instead of a
> global pointer. So I set to do that, and it turns out to appear a sane
> thing to do. Here is a patch.
Here is the combined patch, keeping track of both ActiveSnapshot as a
stack and snapshots registered on a list. I figured out that the
easiest way to manage the memory is to keep track of reference counts in
the snapshot itself, separately for the active snapshot stack and the
registered list, so we know the earliest time to free it.
- SerializableSnapshot is not handled. (I think this is just a matter
of adding a RegisterSnapshot call as soon as the serializable snapshot
- Creating the VacuumXmin stuff to actually use it, and decide what to
do with GetOldestXmin.
Comments are very welcome.
Alvaro Herrera http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
In response to
pgsql-patches by date
|Next:||From: Magnus Hagander||Date: 2008-04-15 08:00:06|
|Subject: Re: libpq Win32 Mutex performance patch|
|Previous:||From: Brendan Jurd||Date: 2008-04-14 21:23:13|
|Subject: Removing typename from A_Const (was: Empty arrays with ARRAY)|