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

From SBob
Subject Re: Vacuum not cleaning up rows.
Date
Msg-id 9887eca2-9316-4f76-bc7b-545d7ccf516d@www.fastmail.com
Whole thread Raw
In response to Re: Vacuum not cleaning up rows.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Got it. can someone point me to more reading on snapshots  and snapshot-horizon?

Thanks!



On Fri, Jun 21, 2019, at 10:08 AM, Tom Lane wrote:
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 database in a cluster can prevenr vacuum from cleaning up row versions in a table within another database. How is that possible since 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: Tom Lane
Date:
Subject: Re: Vacuum not cleaning up rows.
Next
From: Louis Brauer
Date:
Subject: Update materialized view definition kills indexes