Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1jHHYo-0001Tt-L1 for pgsql-general@arkaria.postgresql.org; Thu, 26 Mar 2020 01:43:55 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHHYl-0004lZ-V3 for pgsql-general@arkaria.postgresql.org; Thu, 26 Mar 2020 01:43:51 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHHYj-0004lS-VF for pgsql-general@lists.postgresql.org; Thu, 26 Mar 2020 01:43:51 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jHHYc-0005DY-St for pgsql-general@lists.postgresql.org; Thu, 26 Mar 2020 01:43:48 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 68CD95C00F0; Wed, 25 Mar 2020 21:43:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 25 Mar 2020 21:43:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=Z8VmtbuX6zJ7Nv/gTcWmR+KweB9 aS2jd1ac1TXVkDc8=; b=hZ4lsoh6N9Tz/my/tDSbJqMd73vNZm119Vhy9SH3yZ4 ScI4iJeiNamViBN/ZTC2MxwE14+tHAokccK5BXaBQdtEOUkzePwM2x7vReHQI1Uz Pdjl/pCkKY57xAGNCb2WiBgPBNq1xgPQqsUSqpFXINOULbCrEMxVohy7WTzFz6e+ 8hGDTuRyrq52aycp5yFp0QzDZqHgxqtbbkBRq0BBJFU4zy7WXFtWYbX1brSRaoWr NGTcWNj8S3SE/Ryd6ixPkZmF9cnNZ5ayvk43T9YYeIJfy5iavBRdQGL/Dal+cC7i AJ57WL07TRil4Hmdb0h4Rf+050Uc0Je4QbUGgZ6uAWw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Z8Vmtb uX6zJ7Nv/gTcWmR+KweB9aS2jd1ac1TXVkDc8=; b=x5DmggZWhsvW6XK1RUOd6C JaO403A7AXadHdhiGc0y8NGKhTcix+NAR8E0Aylr9644JEQZAWVxrroTgW4Suo6s VJb21RyyCGVdyg4XprvHZ/uRkGBg6v8d+LQ4EJsUIs2hhpb3KbwTPXt6/tml4Ubj TVaiMJ/vyzto8IAJKG2nqAlPXqIlqEvYvN77IWPKjRug6mCxHG9iZHki0kZACE8F s3YycXBfmKKded3vCpzyEFniWsp8ZS8kbPR+SPn2b1ZtOHFP+3o60gFTGGG8JcB2 pHEuUvSRYaghNXe4Md4GE/WYLXGNe8C2bm7StAxo67hxrr4xzXf25Vc4KZVG882w == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehhedgfeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucfkphepudduuddruddtvddrudektddrudekheenucevlhhu shhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlse hprghquhhivghrrdighiii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 19F62328005A; Wed, 25 Mar 2020 21:43:38 -0400 (EDT) Date: Thu, 26 Mar 2020 10:43:36 +0900 From: Michael Paquier To: Justin King Cc: Andres Freund , Julien Rouhaud , pgsql-general@lists.postgresql.org, kgrittn@gmail.com Subject: Re: PG12 autovac issues Message-ID: <20200326014108.GA2199@paquier.xyz> 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> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7AUc2qLy4jB3hD7Z" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --7AUc2qLy4jB3hD7Z Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --7AUc2qLy4jB3hD7Z Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl58CMgACgkQnvQgOdby QH3Wsg/9E8kiPl6uW3WnXvd3udj1n43rcRaERL6xJGvUl0WByFgH/mFU6gK0RW0+ wPovJ2nMOFZBfqYIKiphfdTUUc+H9yUVJHiEyBSesZFpO/RopmqvakVIxveSJBiG 5hQIh8g4mVtp809KmRhJFLEJ059GOSx0ywgS2XW2V+ejJ61z2IZbUuPigziRfbPm LwWDcCR9zDGsAJv4GT/+X1oHqnn6LoZ1jBAfjGpXRas3g9hh/k3xvgiUJUZjMmDN P6bAE/1L1Si6BxBq6Uq4Kk7t4LDW3IO4cSm5zs0fxdc8hR4Mg8rK6lEZ2U/EUjrt cEDNVfw7TvcPYf6wbzWM04R8I0Og4r2IBL8576F5x4e1JvBV99TEJy1RfySDvAaa MxyQzm+a5ed4cv6rQEOkvYwSlDdMhFkT1F0t2i8nxX5uDfLpUTpHj0lYrJH2euFK L2FszPe/Uo4x2grykAwCrYB7a76zlqT+n/rHzo6ancJ/+Hko6L4qX6XybN+lvn+w IIEJ8IW0O9sPmB5skVaDX+P2rgwHJYzBZYbEmOtdi+Gx/7FACPw3HThLTTvOGNsE ZivIXRZHUMHw/lKGbN1MO4rWhWbwANY5U2DGd1ucIxZrKF9IuwYV5ef/N3HPfhsa Ng3Ec9Obl6se+xXGlubt3NuNizEjaFUrOaPMpzWH6Ca7atSd8Rg= =DvM9 -----END PGP SIGNATURE----- --7AUc2qLy4jB3hD7Z--