Manfred Koizar wrote:
> With subtransactions we'd have to fall back to checking pg_clog (and
> pg_subtrans) in certain cases.  There are lots of possible
> implementations.  Here are some ideas (just brainstorming):
> 
>  .  We could first scan the PGPROC array.  If the xid is an active main
> transaction, we're finished.
> 
>  .  If xid is older than RecentGlobalXmin, it cannot be active.
> 
>  .  We could include a small number of subtransaction xids in PGPROC.
> 
>  .  For additional subtransactions not fitting into this small array
> there could be minsubxid and maxsubxid fields in PGPROC.  If the xid we
> are looking for is outside all these ranges, it cannot be an active
> subtransaction.
> 
>  .  If all these tests fail, we fall back to checking pg_clog.

Could we add a boolean to each PROC structure indicating if that xid has
subtransactions?  If none have subtransactions, we don't need to look in
pg_clog.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  [EMAIL PROTECTED]               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to