"Kevin Grittner" <kevin.gritt...@wicourts.gov> writes:
> Heikki Linnakangas  wrote:
>> 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.

That assumption is absolutely, totally not going to fly.

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

Yes, it should work.  If it doesn't, you are failing to manage the
TransactionXmin horizon correctly.

                        regards, tom lane

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to