Re: Autovacuum on partitioned table
yuzuko <yuzukohosoya@gmail.com>
From: yuzuko <yuzukohosoya@gmail.com>
To: Laurenz Albe <laurenz.albe@cybertec.at>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>,
Greg Stark <stark@mit.edu>
Date: 2019-12-27T03:37:15Z
Lists: pgsql-hackers
Attachments
- v2_autovacuum_on_partitioned_table.patch (application/octet-stream) patch v2
Hi, As Laurenz commented in this thread, I tried adding option to update parent's statistics during Autovacuum. To do that, I propose supporting 'autovacuum_enabled' option already exists on partitioned tables. In the attached patch, you can use 'autovacuum_enabled' option on partitioned table as usual, that is, a default value of this option is true. So if you don't need autovacuum on a partitioned table, you have to specify the option: CREATE TABLE p(i int) partition by range(i) with (autovacuum_enabled=0); I'm not sure but I wonder if a suitable value as a default of 'autovacuum_enabled' for partitioned tables might be false. Because autovacuum on *partitioned tables* requires scanning all children to make partitioned tables' statistics. But if the default value varies according to the relation, is it confusing? Any thoughts? -- Best regards, Yuzuko Hosoya NTT Open Source Software Center
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