The statement from the documentation is true, but misleading. Autovacuum does not process the partitioned table itself, but it processes the partitions, which are regular PostgreSQL tables. So dead tuples get removed, the visibility map gets updated, and so on. In short, there is nothing to worry about as far as vacuuming is concerned. Remember that the partitioned table itself does not hold any data!
What the documentation warns you about is ANALYZE. Autovacuum also launches automatic ANALYZE jobs to collect accurate table statistics. This will be work fine on the partitions, but there are no table statistics collected on the partitioned table itself, so you have to run ANALYZE manually on the partitioned table to get these data. In practice, I find that not to be a problem, since the optimizer generates plans for each individual partition anyway, and there it has accurate statistics.
Been Googling for a couple of hours. Can't seem to find if one can just vacuum certain partitions of a partitioned table. It seems like you can vacuum the table, but I've got a HUGE table (partitions by day and each day is several hundred gigs) and when we run our vacuumdb command, it takes forever.
So we thought that we'd split up the vacuuming, and do some tables on Monday, some on Tuesday etc. But there's this one table that we'd like to NOT do all at once.
Now we're moving to native partitioning but aren't there yet. However I don't think that this changes the ability (or not) of being able to vacuum a partition, but I'd be happy to learn otherwise.
Hello,
When working with table declarative partitioning, do you have to `vacuum analyze` newly added partitions or you can directly do it on the parent table?
When reading the documentation, it has to be done for table partitioning using inheritance but it is not specified for declarative partitioning.
For context, I have a daily ingestion process that pushes new data into a partition table. For each batch, it lists the incoming dates, drops the related partitions, creates new empty partitions and loads the data into the parent table that reroutes them into the appropriate partitions. I then run `vacuum analyze` on each newly created partition.
Thanks!