Re: [Proposal] More Vacuum Statistics - Mailing list pgsql-hackers

From Tomas Vondra
Subject Re: [Proposal] More Vacuum Statistics
Date
Msg-id 5569E7E2.9020601@2ndquadrant.com
Whole thread Raw
In response to Re: [Proposal] More Vacuum Statistics  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers

On 05/30/15 16:47, Tom Lane wrote:
>
>
> Another reason why that would be a bad place is that a pg_class update
> forces relcache invalidation and thereby cached-plan invalidation.
> You don't want that for anything except (1) DDL affecting the table or
> (2) change in statistics that affect plan choices.  It's not random
> chance that relallvisible is in pg_class while some other stats are in
> the stats collector's stuff --- the planner looks at relallvisible
> but not the other stuff.

We already update pg_class from autovacuum - see vac_update_relstats(). 
Presumably we could update the new fields in the same way, without 
introducing any additional cache invalidations or bloat.

But I do agree pg_class really is not the right place for this for the 
other reasons.

--
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



pgsql-hackers by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: [Proposal] More Vacuum Statistics
Next
From: Tomas Vondra
Date:
Subject: Re: nested loop semijoin estimates