Greg Stark <gsstark@mit.edu> writes:
> There could be a per-database "oldest xid" that any vacuum on any table
> updates (by skimming all the "oldest xid"s for the current database). If
> that's stored in the shared pg_database table then it's accessible regardless
> of what database you connect to, no?
You mean like pg_database.datfrozenxid?
The problem is not that we don't have the data. The problem is getting
the data to where it's needed, which is GetNewTransactionId(). That
routine cannot be responsible for finding it out for itself, because we
haven't yet started a transaction at the time where we need to know
if it's safe to consume an XID.
regards, tom lane