Re: Autovacuum on partitioned table
Amit Langote <amitlangote09@gmail.com>
From: Amit Langote <amitlangote09@gmail.com>
To: yuzuko <yuzukohosoya@gmail.com>
Cc: Masahiko Sawada <masahiko.sawada@2ndquadrant.com>, Laurenz Albe <laurenz.albe@cybertec.at>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Greg Stark <stark@mit.edu>
Date: 2020-02-20T08:32:40Z
Lists: pgsql-hackers
On Thu, Feb 20, 2020 at 4:50 PM Amit Langote <amitlangote09@gmail.com> wrote: > * I may be missing something, but why doesn't do_autovacuum() fetch a > partitioned table's entry from pgstat instead of fetching that for > individual children and adding? That is, why do we need to do the > following: > > + /* > + * If the relation is a partitioned table, we check it > using reltuples > + * added up childrens' and changes_since_analyze tracked > by stats collector. Oh, it's only adding up children's pg_class.reltuple, not pgstat stats. We need to do that because a partitioned table's pg_class.reltuples is always 0 and correctly so. Sorry for not reading the patch properly. Thanks, Amit
Commits
-
Keep stats up to date for partitioned tables
- e1efc5b465c8 14.0 landed
- 375aed36ad83 15.0 landed
-
Revert analyze support for partitioned tables
- b3d24cc0f0aa 14.0 landed
- 6f8127b73901 15.0 landed
-
Document ANALYZE storage parameters for partitioned tables
- 41badeaba8be 14.0 landed
-
autovacuum: handle analyze for partitioned tables
- 0827e8af70f4 14.0 landed