Re: Serializable Snapshot Isolation - Mailing list pgsql-hackers

From Kevin Grittner
Subject Re: Serializable Snapshot Isolation
Date
Msg-id 4C9311120200002500035927@gw.wicourts.gov
Whole thread Raw
In response to Serializable Snapshot Isolation  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Responses Re: Serializable Snapshot Isolation
Re: Serializable Snapshot Isolation
List 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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Configuring synchronous replication
Next
From: Fujii Masao
Date:
Subject: Re: Configuring synchronous replication