Alvaro Herrera <alvherre@dcc.uchile.cl> writes:
> (I'd like to avoid the pg_subtrans lookup in the non-subtransaction case,
> but I don't see how to do that.)
Could we afford to make xids self-identifying? For instance, odd
numbers are base xacts, even numbers are sub xacts. This would in the
worst case cause us to cycle through the XID space twice as fast as we
need to, but I'm not convinced that's a big problem.
regards, tom lane