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
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers