Hi Alvaro, Thank you for your comments. > I'm confused about some error messages in the regression test when a > column is mentioned twice, that changed from mentioning the table named > in the vacuum command, to mentioning the first partition. Is that > because you changed an lappend() to lcons()? I think you do this so > that the counters accumulate for the topmost parent that will be > processed at the end. I'm not sure I like that too much ... I think > that needs more thought. > I couldn't come up with a solution that counts changes_since_analyze precisely when analyzing partitioned trees by ANALYZE command based on this approach (update all ancestor's changes_since_analyze according to the number of analyzed tuples of leaf partitions).
So I tried another approach to run autovacuum on partitioned tables. In this approach, all ancestors' changed_tuples are updated when commiting transactions (at AtEOXact_PgStat) according to the number of inserted/updated/ deleted tuples of leaf partitions. Attach the latest patch. What do you think? -- Best regards, Yuzuko Hosoya NTT Open Source Software Center
v7_autovacuum_on_partitioned_table.patch
Description: Binary data