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 1jJ73T-0003kd-4r for pgsql-committers@arkaria.postgresql.org; Tue, 31 Mar 2020 02:55: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 1jJ73Q-0003FQ-RK for pgsql-committers@arkaria.postgresql.org; Tue, 31 Mar 2020 02:55:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ73Q-0003FJ-Lw for pgsql-committers@lists.postgresql.org; Tue, 31 Mar 2020 02:55:04 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jJ73N-0005MA-Su; Tue, 31 Mar 2020 02:55: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 02V2swSP015013; Mon, 30 Mar 2020 22:54:58 -0400 From: Tom Lane To: David Rowley cc: pgsql-committers@lists.postgresql.org, Tomas Vondra Subject: Re: pgsql: Attempt to fix unstable regression tests, take 2 In-reply-to: <11757.1585619115@sss.pgh.pa.us> References: <10234.1585613690@sss.pgh.pa.us> <11757.1585619115@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 30 Mar 2020 21:45:15 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <15011.1585623298.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Mon, 30 Mar 2020 22:54:58 -0400 Message-ID: <15012.1585623298@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Anyway, I remain suspicious that the instability is the fault > of something in the statistics code, not of autovacuum. I've been trying to reproduce this by dint of running just the stats_ext script, over and over in a loop. I've not had any success on fast machines, but on a slow one (florican's host) I got this after a few hundred iterations: diff -U3 /usr/home/tgl/pgsql/src/test/regress/expected/stats_ext.out /usr/= home/tgl/pgsql/src/test/regress/results/stats_ext.out --- /usr/home/tgl/pgsql/src/test/regress/expected/stats_ext.out 2020-03-30= 21:15:19.749874000 -0400 +++ /usr/home/tgl/pgsql/src/test/regress/results/stats_ext.out 2020-03-30= 22:29:04.062103000 -0400 @@ -1172,7 +1172,7 @@ SELECT * FROM check_estimated_rows('SELECT * FROM mcv_lists WHERE a =3D 1= AND b =3D ''1'''); estimated | actual = -----------+-------- - 1 | 50 + 50 | 50 (1 row) = VACUUM (ANALYZE) mcv_lists; 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. I'm thinking that what we ought to do is have this test disable autovac altogether on its tables, ie CREATE TABLE ... WITH (autovacuum_enabled =3D off); However, I remain suspicious that there's something else going on, unrelated to autovac. All the buildfarm cases so far have been small underestimates, one or two rows, so they look entirely different from the example above. Even if autovacuum is firing unexpectedly, how would it cause such results? regards, tom lane