Re: Vacuum not cleaning up rows. - Mailing list pgsql-admin

From Tom Lane
Subject Re: Vacuum not cleaning up rows.
Date
Msg-id 29887.1561126102@sss.pgh.pa.us
Whole thread Raw
In response to Re: Vacuum not cleaning up rows.  (SBob <sbob@quadratum-braccas.com>)
Responses Re: Vacuum not cleaning up rows.  (SBob <sbob@quadratum-braccas.com>)
List pgsql-admin
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



pgsql-admin by date:

Previous
From: SBob
Date:
Subject: Re: Vacuum not cleaning up rows.
Next
From: SBob
Date:
Subject: Re: Vacuum not cleaning up rows.