pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Partitioned tables are not processed by autovacuum.
2+ messages / 2 participants
[nested] [flat]

* Partitioned tables are not processed by autovacuum.
@ 2022-10-31 22:32  PG Doc comments form <noreply@postgresql.org>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2022-10-31 22:32 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: rruenroeng@gmail.com

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.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Partitioned tables are not processed by autovacuum.
@ 2022-11-01 13:43  Laurenz Albe <laurenz.albe@cybertec.at>
  parent: PG Doc comments form <noreply@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Laurenz Albe @ 2022-11-01 13:43 UTC (permalink / raw)
  To: rruenroeng@gmail.com; pgsql-docs@lists.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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-11-01 13:43 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-10-31 22:32 Partitioned tables are not processed by autovacuum. PG Doc comments form <noreply@postgresql.org>
2022-11-01 13:43 ` Laurenz Albe <laurenz.albe@cybertec.at>

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