Another annoyance I noticed while testing the case of a lot of subtransactions (overflowing the procarray cache) is that when you have a transaction with a lot of subtransactions open, getting the initial snapshot fails, and the standby doesn't open for read-only queries.

Normally, GetRunningTransactionData determines the xid of the latest running xid by scanning the procarray. If the subxid cache has overflowed, it simply gives up. Comment there suggests that it could call ReadNewTransactionId() instead, like it does when there's no active xids in proc array. I think we should do that, or something else to alleviate the problem.

When there's no xids in the procarray, couldn't we just use latestCompletedXid instead of calling ReadNewTransactionId()?

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

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