From: Laurenz Albe <laurenz.albe@cybertec.at>
To: rruenroeng@gmail.com
To: pgsql-docs@lists.postgresql.org
Subject: Re: Partitioned tables are not processed by autovacuum.
Date: Tue, 01 Nov 2022 14:43:27 +0100
Message-ID: <d55408fb169cfdd6c7f363057ecf3bccf284fcdc.camel@cybertec.at> (raw)
In-Reply-To: <166725557839.630.12125626056953515266@wrigleys.postgresql.org>
References: <166725557839.630.12125626056953515266@wrigleys.postgresql.org>
On Mon, 2022-10-31 at 22:32 +0000, PG Doc comments form wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/15/runtime-config-autovacuum.html
> Description:
>
> There is a statement in the Postgres Docs: "Partitioned tables are not
> processed by autovacuum."
> https://www.postgresql.org/docs/15/routine-vacuuming.html
>
> What does the above statement mean?
> Does autovacuum not process both the parent and the child tables in a
> partition relationship?
>
> What is the definition of a partitioned table?
>
> I have a table with 50+ million rows that gets data added to/wiped from it
> every 90 days. We are planning to break this table into a few thousand
> partitions. More partitions will likely be added in the future, but we don't
> have plans to delete any of the partitions. Will we need to manually track
> the statistics of these partitions and manually vacuum the tables or will
> autovacuum help to manage them?
>
> I found the above statement unclear.
I have proposed an improvement here:
https://postgr.es/m/1fd81ddc7710a154834030133c6fea41e55c8efb.camel@cybertec.at
You could review my patch for the current commitfest:
https://commitfest.postgresql.org/40/3963/
The meaning of "partitioning" is defined here:
https://www.postgresql.org/docs/current/ddl-partitioning.html
You won't have to track the statistics on the partitions, but if you need accurate
statistics for the partitioned table itself, you will have to run ANALYZE on it.
Yours,
Laurenz Albe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: laurenz.albe@cybertec.at, rruenroeng@gmail.com, pgsql-docs@lists.postgresql.org
Subject: Re: Partitioned tables are not processed by autovacuum.
In-Reply-To: <d55408fb169cfdd6c7f363057ecf3bccf284fcdc.camel@cybertec.at>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox