pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Bug reporting form <noreply@postgresql.org>
To: pgsql-bugs@lists.postgresql.org
Cc: bm.kinder@gmail.com
Subject: BUG #16620: Autovacuum does not process certain databases after migration from postgresql 10
Date: Wed, 16 Sep 2020 13:39:08 +0000
Message-ID: <16620-57ee4c2e1b7b5fef@postgresql.org> (raw)

The following bug has been logged on the website:

Bug reference:      16620
Logged by:          Max Vikharev
Email address:      bm.kinder@gmail.com
PostgreSQL version: 12.3
Operating system:   Linux
Description:        

Hi,

There is a cluster with 50 databases. The sizes of tables are very
different, from megabytes to terabytes.

We have been successfully used the aggressive autovacuum for a long time.
After upgrade from 10 to 12.3 we've noticed that autovacuum always process
relations from one database but does not reach others.

I've used
https://www.depesz.com/2020/01/29/which-tables-should-be-auto-vacuumed-or-auto-analyzed/comment-page...
to detect existance of relations that should be autovacuumed. There are a
lot of them. At the same time i see that there are free autovacuum workers
that should do this work. But tables are not processed for a long time.

I have logs (log_autovacuum_min_duration = 0) that confirms that only single
database is constantly being autovacuumed. Within pg_stat_user_tables i see
that last time autovacuum / autoanalyze for  other databases happened in the
same day when "vacuum to prevent wraparound" worked.

Please help to investigate the problem. Why my relations does not processed
and how can i fix it.

Example table
-[ RECORD 1 ]-------+------------------------------
n_tup_ins           | 25599733
n_tup_upd           | 2206685374
n_tup_del           | 19938580
n_tup_hot_upd       | 1863307770
n_live_tup          | 186473676
n_dead_tup          | 18177988
n_mod_since_analyze | 3250337
last_autovacuum     | 2020-08-26 16:43:02.321971+03
last_autoanalyze    | 2020-08-26 14:04:19.132566+03
vacuum_count        | 1
autovacuum_count    | 4078
analyze_count       | 8
autoanalyze_count   | 357

Autovacuum settings
"autovacuum_max_workers" => 5,
"autovacuum_naptime" => "30s",
"autovacuum_vacuum_threshold" => 5000
"autovacuum_vacuum_scale_factor" => 0.00001
"autovacuum_vacuum_cost_delay" => "10ms"
"autovacuum_vacuum_cost_limit" => 6000,
"autovacuum_analyze_threshold" => 5000,
"autovacuum_analyze_scale_factor" => "0.01"



view thread (5+ messages)  latest in thread

Message-ID: <16620-57ee4c2e1b7b5fef@postgresql.org>
Permalink:  ../16620-57ee4c2e1b7b5fef@postgresql.org/
Also on:    postgresql.org/message-id/16620-57ee4c2e1b7b5fef@postgresql.org

 · 

reply

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-bugs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-bugs@lists.postgresql.org, bm.kinder@gmail.com
  Subject: Re: BUG #16620: Autovacuum does not process certain databases after migration from postgresql 10
  In-Reply-To: <16620-57ee4c2e1b7b5fef@postgresql.org>

* 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