Re: Serializable Snapshot Isolation

From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Kevin Grittner <Kevin(dot)Grittner(at)wicourts(dot)gov>
Cc: Dan Ports <drkp(at)csail(dot)mit(dot)edu>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Serializable Snapshot Isolation
Date: 2010-09-17 06:11:35
Message-ID: 4C930697.9090004@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 17/09/10 01:35, Kevin Grittner wrote:
> Heikki Linnakangas<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
>
>> The functions are well commented, but an overview at the top of
>> the file of all the hash tables and other data structures would be
>> nice. What is stored in each, when are they updated, etc.
>
> I moved all the structures from predicate.h and predicate.c to a new
> predicate_internal.h file and added comments. You can view its
> current contents here:
>
> http://git.postgresql.org/gitweb?p=users/kgrittn/postgres.git;a=blob;f=src/include/storage/predicate_internal.h;h=7cdb5af6eebdc148dd5ed5030847ca50d7df4fe8;hb=7f05b21bc4d846ad22ae8c160b1bf8888495e254
>
> Does this work for you?

Yes, thank you, that helps a lot.

So, the purpose of SerializableXidHash is to provide quick access to the
SERIALIZABLEXACT struct of a top-level transaction, when you know its
transaction id or any of its subtransaction ids. To implement the "or
any of its subtransaction ids" part, you need to have a SERIALIZABLEXID
struct for each subtransaction in shared memory. That sounds like it can
eat through your shared memory very quickly if you have a lot of
subtransactions.

Why not use SubTransGetTopmostTransaction() ?

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2010-09-17 07:06:30 Re: Re: [COMMITTERS] pgsql: Use a latch to make startup process wake up and replay
Previous Message Fujii Masao 2010-09-17 05:33:13 Re: [HACKERS] Re: pgsql: Use a latch to make startup process wake up and replay