Re: Autovacuum on partitioned table - Mailing list pgsql-hackers

From yuzuko
Subject Re: Autovacuum on partitioned table
Date
Msg-id CAKkQ50_2HWfJJ7NYfmGvyNE9DYTdrANkG53RtXudVAwddh5ACg@mail.gmail.com
Whole thread Raw
In response to Re: Autovacuum on partitioned table  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
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

Attachment

pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: User Interface for WAL usage data
Next
From: Jeff Davis
Date:
Subject: Re: Make MemoryContextMemAllocated() more precise