Re: BUG #16620: Autovacuum does not process certain databases after migration from postgresql 10

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Max Vikharev <bm(dot)kinder(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16620: Autovacuum does not process certain databases after migration from postgresql 10
Date: 2020-09-17 01:19:54
Message-ID: 98503.1600305594@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Max Vikharev <bm(dot)kinder(at)gmail(dot)com> writes:
> Problem gone after restarting the cluster.
> Autovacuum started to process relations in other databases.

Hmm, interesting.

> I dont know how to reproduce the issue, we will monitor it.
> If there any way to debug it when it occurs again - let me know.

Did you by any chance capture the contents of pg_database.datfrozenxid
and datminmxid and compare them to the pg_class.relfrozenxid and
relminmxid fields in the problematic databases?

It's not hard to imagine that if the pg_database fields somehow
didn't get updated correctly during pg_upgrade, that would prevent
autovacuum from processing some databases to prevent wraparound.
However, that doesn't explain failure to examine those databases
at all, so I'm a bit at a loss.

Another thing to check is whether the stats collector is working.
Specifically look at whether counts in pg_stat_all_tables are
incrementing in the problem databases.

My guess is that somehow pg_upgrade left something in a slightly
hosed state, and that restarting de-hosed it, so that you aren't
going to see this again ... at least not till your next upgrade.
But I don't know exactly what the something could be.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Pavel Stehule 2020-09-17 03:49:14 Re: Strange output of XML attribute values
Previous Message Peter Geoghegan 2020-09-16 22:29:50 Re: BUG #16619: Amcheck detects corruption in hstore' btree index (ver 2)