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 1jGpS6-0006vh-Jd for pgsql-general@arkaria.postgresql.org; Tue, 24 Mar 2020 19:43:06 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1jGpS4-0004LI-PO for pgsql-general@arkaria.postgresql.org; Tue, 24 Mar 2020 19:43:04 +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 1jGpS4-0004LB-C1 for pgsql-general@lists.postgresql.org; Tue, 24 Mar 2020 19:43:04 +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 1jGpS1-0007Gv-UE for pgsql-general@lists.postgresql.org; Tue, 24 Mar 2020 19:43:03 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 1DB285C019D; Tue, 24 Mar 2020 15:43:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Tue, 24 Mar 2020 15:43:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=1BZMrTVH7yT7OrVwIa8uPBMu5ds wJTX92XSxtyfayfI=; b=ldcnM7HRT/DaSozx5FQtFH/UUy2f2ljBjoZ9IlJFpyQ 5PKvGx90KxoOq421der5QVpEBlUNavEkG0Y0rAtIaTU0kYXlNVaCSi0AvFUNpb2j MFToUBOvssqVJvfy4IfAoy0yCcXF0C/OWXG69Ovud1GBho3Waj3/46IZIYz89t44 2Jeg9NfeDcK38T0szv6vxSlfKCxmDFDqmn2Mx7/4flyr3ju3cznlVBuCu7Y7WRbU k4bZkuVTIwTGWyEE9YL4kG+pHVJYCkWmR+5T2Jukc8EpmNIK6lPqSuLO/ehQxavc UvsmEvEsutmXTc372il7C3RrcVecg1FutGIpyiVRyXQ== 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=1BZMrT VH7yT7OrVwIa8uPBMu5dswJTX92XSxtyfayfI=; b=kG1xDDXnlntKLFjgcirHMc 9f+eq5gRZNbhLgyIKlgKRQ8LTztiqvAjvLT/DpNYENHg+B7pZh5SFAOL/WVsY/dh XPE4oT10CGtWjiZ5EB/a0UGI7o1R/rGnzGgYQCqgifaLPJoX7j5R+Px36ctAympe U583zlQWmJrQdQrgkld/s6DwmrybDpLadI+U+RbMx5k4qfw2nM/gup3UytKbfYpq 8QJ3ewrCVtj/s3zrQPklcOfFsQn7udb6CZ5rUha7DcSJJJmg18GTt4zqflXKnwo4 bei9CIOdoypJ1Ojb8z/YuHlinTSjcQmU7R0gh98M8Zlq4jsLMXE27irfeBSWxHwA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrudehuddgleejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucffohhmrg hinhepphhoshhtghhrrdgvshenucfkphepieejrdduiedtrddvudejrddvhedtnecuvehl uhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghsse grnhgrrhgriigvlhdruggv X-ME-Proxy: Received: from intern.anarazel.de (c-67-160-217-250.hsd1.ca.comcast.net [67.160.217.250]) by mail.messagingengine.com (Postfix) with ESMTPA id 48FCE328005D; Tue, 24 Mar 2020 15:43:00 -0400 (EDT) Date: Tue, 24 Mar 2020 12:42:59 -0700 From: Andres Freund To: Michael Paquier Cc: Julien Rouhaud , Justin King , pgsql-general@lists.postgresql.org, kgrittn@gmail.com Subject: Re: PG12 autovac issues Message-ID: <20200324194259.pidupqxtqnquk4wu@alap3.anarazel.de> References: <20200319235626.wz4b57hbhuuy4w7j@alap3.anarazel.de> <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200324061238.GG1836@paquier.xyz> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Hi, On 2020-03-24 15:12:38 +0900, Michael Paquier wrote: > > Well, there's no logging of autovacuum launchers that don't do anything > > due to the "skipping redundant" logic, with normal log level. If somehow > > the horizon logic of autovacuum workers gets out of whack with what > > vacuumlazy.c does, then you'd not get any vacuums. But a usage level > > triggered analyze could still happen on such a table, I think. > > What surprised me the most is that the same table happened to be > analyzed again and again after the launcher began its blackout. Well, if there's an issue with the "redundant" logic, that would be a not too surprising outcome. It's quite plausible that one or two tables in the database would get enough changes to occasionally need to be analyzed. If the workload is steady, that could e.g. work out to every ~17 minutes. All tables that autovacuum things are not wraparound threatened will be skipped, but ones that are will get both vacuum and analyze queued. The redundant logic could then entirely skip all vacuums - but there's no equivalent for analyze. > > While looking at this issue I found a few problems, btw. That seems more > > like a -hackers discussion, so I started: > > https://postgr.es/m/20200323235036.6pje6usrjjx22zv3%40alap3.anarazel.de > > Yes, let's discuss there. Cool. Would also be good if you could expand on the thread introducing the "redundant" logic. Greetings, Andres Freund