SBob <sbob@quadratum-braccas.com> writes:
> I do see older backend_start values (from around 6 hours ago). However I am confused as to how a connection to one
databasein a cluster can prevenr vacuum from cleaning up row versions in a table within another database. How is that
possiblesince onle one database has access to this table?
Because the snapshot-horizon calculations are done system-wide.
We can't just lobotomize them to only consider the current DB,
because that would result in wrong row-cleanup decisions for shared
catalogs.
There are some attempts to refine that when vacuuming a non-shared table,
but that can only go so far given the limited amount of state that
backends expose about this. Doing better would require expending
more effort in transaction start/transaction stop/snapshot creation,
which are hot spots so it hasn't seemed like it'd be a good tradeoff.
regards, tom lane