Re: Serializable Snapshot Isolation

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

Heikki Linnakangas wrote:

> 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.

Right.

> To implement the "or any of its subtransaction ids" part, you need
> to have a SERIALIZABLEXID struct for each subtransaction in shared
> memory.

Close -- each subtransaction which writes any tuples.

> That sounds like it can eat through your shared memory very quickly
> if you have a lot of subtransactions.

Hmmm.... I've never explicitly used subtransactions, so I don't tend
to think of them routinely going too deep. And the struct is pretty
small.

> Why not use SubTransGetTopmostTransaction() ?

This needs to work when the xid of a transaction is found in the MVCC
data of a tuple for any overlapping serializable transaction -- even
if that transaction has completed and its connection has been
closed. It didn't look to me like SubTransGetTopmostTransaction()
would work after the transaction was gone.

I guess that's something I should mention in the comments....

-Kevin

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2010-09-17 11:56:59 Re: Configuring synchronous replication
Previous Message Robert Haas 2010-09-17 11:44:33 Re: Configuring synchronous replication