pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Justin King <kingpin867@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: Julien Rouhaud <rjuju123@gmail.com>
Cc: pgsql-general@lists.postgresql.org
Cc: kgrittn@gmail.com
Subject: Re: PG12 autovac issues
Date: Thu, 26 Mar 2020 10:43:36 +0900
Message-ID: <20200326014108.GA2199@paquier.xyz> (raw)
In-Reply-To: <CAE39h23EoQpGeBN4XDg5MhZZFz_AMbnr7O+h-Q=LXvS1ZuoXyQ@mail.gmail.com>
References: <20200320190317.gdxwzexdfutymqs6@alap3.anarazel.de>
	<20200323152247.GB52612@nol>
	<20200323162303.s7ay5hjdvimtkz6u@alap3.anarazel.de>
	<20200323194725.GC52612@nol>
	<20200323200051.qzyqvnips7o3ai4g@alap3.anarazel.de>
	<20200324052606.GE1836@paquier.xyz>
	<20200324054039.ulrxbzo2ycy7pu5i@alap3.anarazel.de>
	<20200324061238.GG1836@paquier.xyz>
	<20200324194259.pidupqxtqnquk4wu@alap3.anarazel.de>
	<CAE39h23EoQpGeBN4XDg5MhZZFz_AMbnr7O+h-Q=LXvS1ZuoXyQ@mail.gmail.com>

On Wed, Mar 25, 2020 at 10:39:17AM -0500, Justin King wrote:
> This started happening again.  DEBUG1 is enabled:

Thanks for enabling DEBUG1 logs while this happened.

> Mar 25 14:48:26 cowtn postgres[39875]: [35298-1] 2020-03-25
> 14:48:26.329 GMT [39875] DEBUG:  skipping redundant vacuum to prevent
> wraparound of table "postgres.pg_catalog.pg_tablespace"
> Mar 25 14:48:26 cowtn postgres[39875]: [35299-1] 2020-03-25
> 14:48:26.339 GMT [39875] DEBUG:  skipping redundant vacuum to prevent
> wraparound of table "postgres.pg_catalog.pg_auth_members"
> Mar 25 14:48:26 cowtn postgres[39875]: [35300-1] 2020-03-25
> 14:48:26.350 GMT [39875] DEBUG:  skipping redundant vacuum to prevent
> wraparound of table "postgres.pg_catalog.pg_replication_origin"

Are you seeing such log entries happening multiple times for the same
relations, meaning that autovacuum workers are just looping on the
same relations all over again?  This part of the logs point to catalog
tables, but are there other tables within your system facing the same
logs, particularly the database "feedi" with some of your own tables?

>  postgres=# SELECT oid::regclass, age(relfrozenxid), relfrozenxid FROM
> pg_class WHERE relfrozenxid <> 0 ORDER BY age(relfrozenxid) DESC LIMIT
> 1;
>     oid    |    age    | relfrozenxid
> -----------+-----------+--------------
>  pg_authid | 202793549 |   4284570172

Ugh.  I think that this is exactly the thing I was suspecting
previously:
- The database stats look sane.
- The relation stats don't look good and visibly are put in such a
state that only one type of jobs gets triggered (non-aggressive but
anti-wraparound), which just keep being skipped and the relation stats
don't get refreshed.  (Such autovacuum jobs should never happen and we
have some underlying issues that will need separate care).

If you still have the cluster in this current state (perhaps you are
not able to keep it longer), could you provide more data about
pg_class.relfrozenxid for the tables which are mentioned in the logs
of the type "skipping redundant vacuum to prevent of table"?

> Let me know if there's anything else useful I can provide.

Thanks!
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (44+ messages)  latest in thread

Message-ID: <20200326014108.GA2199@paquier.xyz>
Permalink:  ../20200326014108.GA2199@paquier.xyz/
Also on:    postgresql.org/message-id/20200326014108.GA2199@paquier.xyz

 · 

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-admin@postgresql.org
  Cc: michael@paquier.xyz, kingpin867@gmail.com, andres@anarazel.de, rjuju123@gmail.com, pgsql-general@lists.postgresql.org, kgrittn@gmail.com
  Subject: Re: PG12 autovac issues
  In-Reply-To: <20200326014108.GA2199@paquier.xyz>

* 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