Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJQnf-0005tP-C5 for pgsql-committers@arkaria.postgresql.org; Wed, 01 Apr 2020 00:00:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJQne-0000pc-2t for pgsql-committers@arkaria.postgresql.org; Wed, 01 Apr 2020 00:00:06 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJQnd-0000oi-T4 for pgsql-committers@lists.postgresql.org; Wed, 01 Apr 2020 00:00:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJQnX-0006nX-Cs; Wed, 01 Apr 2020 00:00:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id 02VNxvJj007771; Tue, 31 Mar 2020 19:59:57 -0400 From: Tom Lane To: David Rowley cc: David Rowley , pgsql-committers@lists.postgresql.org, Tomas Vondra Subject: Re: pgsql: Attempt to fix unstable regression tests, take 2 In-reply-to: References: <10234.1585613690@sss.pgh.pa.us> <11757.1585619115@sss.pgh.pa.us> <15012.1585623298@sss.pgh.pa.us> Comments: In-reply-to David Rowley message dated "Wed, 01 Apr 2020 12:44:09 +1300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7769.1585699197.1@sss.pgh.pa.us> Date: Tue, 31 Mar 2020 19:59:57 -0400 Message-ID: <7770.1585699197@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk David Rowley writes: > On Tue, 31 Mar 2020 at 15:55, Tom Lane wrote: >> Now this *IS* autovacuum interference, but it's hardly autovacuum's fault: >> the test script is supposing that autovac won't come in before it does a >> manual analyze, and that's just unsafe on its face. > Why would that matter? Look again at the failure: the problem is that the test script is populating a table, then doing an EXPLAIN and expecting to see results corresponding to a *not*-ANALYZED table, then doing ANALYZE, then expecting to see EXPLAIN results corresponding to the analyzed state. It's the second step of that that is vulnerable to an ill-timed auto analyze. The only way to prevent it is to disable autovac altogether on the table, as I did a little while ago at 0936d1b6f. This is of course not like the cases we've actually seen so far in the buildfarm, but it's a case that I produced once and it would surely recur. It will be interesting to see if 0936d1b6f really fixes the issue altogether or the instability continues --- but if it does, then autovacuum is not the problem. regards, tom lane