Autovacuum (analyze) on partitioned tables for ATTACH/DETACH/DROP commands
Autovacuum (analyze) on partitioned tables for ATTACH/DETACH/DROP commands
Hello, While discussing auto analyze on partitioned tables, we recognized that auto analyze should run on partitioned tables when ATTACH, DETACH and DROP commands are executed [1]. Partitioned tables are checked whether they need auto analyze according to their changes_since_analyze (total number of inserts/updates/deletes on partitions), but above DDL operations are not counted for now. To support ATTACH, DETACH and DROP commands, I proposed the idea as follows: * I made new configuration parameters, autovacuum_analyze_attach_partition, autovacuum_analyze_detach_partition and autovacuum_analyze_drop_partition to enable/disable this feature. * When a partition is attached/detached/dropped, pgstat_report_anl_ancestors() is called and checks the above configurations. If ture, the number of livetuples of the partition is counted in its ancestor's changed tuples in pgstat_recv_anl_ancestors. Attach the v1 patch. What do you think? [1] https://www.postgresql.org/message-id/ce5c3f04-fc17-7139-fffc-037f2c981bec%40enterprisedb.com -- Best regards, Yuzuko Hosoya NTT Open Source Software Center
Re: Autovacuum (analyze) on partitioned tables for ATTACH/DETACH/DROP commands
От:
Daniel Gustafsson <daniel@yesql.se>
Дата:
> On 21 Jun 2021, at 10:21, yuzuko wrote: > Attach the v1 patch. What do you think? This patch no longer applies to HEAD, can you please submit a rebased version for the commitfest? -- Daniel Gustafsson https://vmware.com/
Re: Autovacuum (analyze) on partitioned tables for ATTACH/DETACH/DROP commands
On Wed, Sep 01, 2021 at 11:11:08AM +0200, Daniel Gustafsson wrote: > This patch no longer applies to HEAD, can you please submit a rebased version > for the commitfest? Four weeks later, nothing has happened. So I have marked the patch as RwF. -- Michael