| From: | yuzuko <yuzukohosoya(at)gmail(dot)com> | 
|---|---|
| To: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> | 
| Cc: | Amit Langote <amitlangote09(at)gmail(dot)com>, Masahiko Sawada <masahiko(dot)sawada(at)2ndquadrant(dot)com>, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Greg Stark <stark(at)mit(dot)edu> | 
| Subject: | Re: Autovacuum on partitioned table | 
| Date: | 2020-04-07 02:34:55 | 
| Message-ID: | CAKkQ50_2HWfJJ7NYfmGvyNE9DYTdrANkG53RtXudVAwddh5ACg@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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 | Content-Type | Size | 
|---|---|---|
| v7_autovacuum_on_partitioned_table.patch | application/octet-stream | 15.1 KB | 
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jeff Davis | 2020-04-07 02:35:35 | Re: Make MemoryContextMemAllocated() more precise | 
| Previous Message | Amit Kapila | 2020-04-07 02:31:09 | Re: User Interface for WAL usage data |