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 1jHJZF-0004ep-0h for pgsql-general@arkaria.postgresql.org; Thu, 26 Mar 2020 03:52:30 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jHJZD-0006AE-Dy for pgsql-general@arkaria.postgresql.org; Thu, 26 Mar 2020 03:52:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1jHJZC-0006A0-GZ for pgsql-general@lists.postgresql.org; Thu, 26 Mar 2020 03:52:27 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jHJZ4-0002Kf-2J for pgsql-general@lists.postgresql.org; Thu, 26 Mar 2020 03:52:25 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1947F5C014D; Wed, 25 Mar 2020 23:52:15 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Wed, 25 Mar 2020 23:52:15 -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=ERPhLNkSETqyhsXltWnVq/zGg93 wFU4jkQlpHHKLzBA=; b=VhD00g5PgLphFZsE6uOG0Qk+AjXLxxZ7Et2EED7NCfN hNHHFqO+AXg1VzkMqPztQ8qykpgimCcwLg6jganOwwJEEJU6damh8bOvAa7o62Gi wPbqwdgKmad2yoaYDbSi3x43gnhUC+vsoefdfuJpaFbkECn/GhOJyNKB0u1aFnem pg7ofOsAxcpehSJMY/L6eR6mdnuMUSz2xAX1XD9bKMfwXYSq2G8GtZeW1HihPOEf 0wnL3cO6I5W92Mwmf3eYTPQkn0jpXZmqUsJFWbzMQHSnrvfN70QXnw++rX0NF1B9 76IzrSDdgepiQG6NIquuEXvxo6qRD1dFdc5hhasr+eQ== 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=ERPhLN kSETqyhsXltWnVq/zGg93wFU4jkQlpHHKLzBA=; b=PftERJKKI10tfavoY3XUu9 5vjvH1gRLzaTVJ2XmRkv0DMuxfUNJl5eNXr4DPab7yNECwEq/JzqjnLHSKA4xwzc 09CSaXadOohtL28MUM90uKy1vhBKt0jocW2hKgJaEvpBFdI3R1wyGz44vGX5SM1a dpCZWfV303ruc4xNQJNh565ApyEjFLNpa5iGDdlyKT2xkWJmmPiUiOr4Vd+BF2LC a+YmXiSKJAZ+yVV6Jt7XuIKWhd+7ECVRzNeAXje2XGrveubYtLD8RENr5tg9KZGf fGG+Ftaup4A6x7WHYX6Q0X6JVltRVti1gkHGulx1Tk2UgeHT8thXbCeCspHAvkvw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehhedgieduucetufdoteggodetrfdotf 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 F31233067CD4; Wed, 25 Mar 2020 23:52:12 -0400 (EDT) Date: Thu, 26 Mar 2020 12:52:10 +0900 From: Michael Paquier To: Andres Freund Cc: Justin King , Julien Rouhaud , pgsql-general@lists.postgresql.org, kgrittn@gmail.com Subject: Re: PG12 autovac issues Message-ID: <20200326035210.GA1471@paquier.xyz> References: <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> <20200326014108.GA2199@paquier.xyz> <20200326025956.zqypnlspv5k5pb42@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xgyAXRrhYN0wYx8y" Content-Disposition: inline In-Reply-To: <20200326025956.zqypnlspv5k5pb42@alap3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --xgyAXRrhYN0wYx8y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 25, 2020 at 07:59:56PM -0700, Andres Freund wrote: > FWIW, this kind of thing is why I think the added skipping logic is a > bad idea. Silently skipping things like this (same with the "bogus" > logic in datfrozenxid computation) is dangerous. I think we should > seriously consider backing this change out. That's actually what I would like to do at this stage as a first step. It looks pretty clear that it does not help. > And if not, then we should at least include enough detail in the message > to be able to debug this. Sure. In any attempt I have done until now I was easily able to skip some jobs, but it should get easier with a higher number of concurrent workers and a higher number of relations heavily updated. Thinking about it, only catalog jobs were getting skipped in my own runs... >> postgres=3D# SELECT datname, age(datfrozenxid), datfrozenxid FROM >> pg_database ORDER BY age(datfrozenxid) DESC LIMIT 1; >> datname | age | datfrozenxid >> ----------+-----------+-------------- >> postgres | 202773709 | 4284570172 >=20 > And why should this lead to anti-wraparound vacuums not happening? This > is older than the the cutoff age? >=20 > xid 4284570172 having the age of 202 million xids suggests that > ReadNewTransactionId() is approx 192376585. Which comports with the log > saying: oldest xmin: 189591147. Oops, sorry. My previous email was incorrect. It looked strange to not see datfrozenxid being refreshed. > Or are you saying that you conclude that the relcache entry is somehow > out of date? It sure is interesting that all of the tables that hit the > "skipping redundant vacuum" condition are shared tables. Yeah, that's actually what I was thinking yesterday. In heap_vacuum_rel(), xidFullScanLimit may be calculated right, but an incorrect value of rd_rel->relminmxid or rd_rel->relfrozenxid could lead to a job to become not aggressive. It should be actually easy enough to check that. -- Michael --xgyAXRrhYN0wYx8y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl58JukACgkQnvQgOdby QH2C5g/+P0u5PcUGXNA/lCQ9iGFKfnnKCP6cZ1faD5MLeDFCIy0Ny+SxeqcCYkjy MhqOnU/RJbZM66IYiu7DWZZy5RiB97zga3ZjG+Bn58IxPInCbqi9hBeCtI/yqLns kLQPySBAKXRAb4tMioiXN0/pen0CaghKqs/H536ChYDKyT4AQRRr3jfYMaRSv3sI kWid1p/QBLUMSUFkCkYgYRNda3X7WcL0dq5JNNnn+Dcr3ACFLjRpPVau6cpZImNh 0UNDj2NYpv9ko+woIy6y1vTAoVgRXJNTMdLKxRRM8CrufsaOU+RwnJt4Kju+DyT+ HI4OLt4BLkhKGENeIEMuQ6t4VGD4xIbIcHX7mxEYknNKCS21MG5hMl50SjxbhIR7 ZapabCP0TfTHihWWUSmcH41z3QZ606rPYpZBphNa/gxkQABZVIKNeF2xySc3tbXo dZTwQVXtspXOts79d6X1JN/4PyESsqTA9nQhOVAks6CgQK4xQly0bGMBRHnxWrUJ tjlpCmcDh4vdvfVi6NeX+VuXY3MTwn9b9n+arWsG1WAt164NSLr/S+VarHXLQdLg zVQ2PJJmG2jGOOeZHvkRrmtIrWwB299r7B1w/ZuT3fnKg1lmYPgrAAkSirrcgJ80 jrJuOBi13AH98aKW11blg5ynJsHmv+PgLYuoBUoxLPY7AASCnFg= =fSTi -----END PGP SIGNATURE----- --xgyAXRrhYN0wYx8y--