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 1jJ5xy-0007Wy-Hh for pgsql-committers@arkaria.postgresql.org; Tue, 31 Mar 2020 01:45:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jJ5xx-0006t6-4B for pgsql-committers@arkaria.postgresql.org; Tue, 31 Mar 2020 01:45:21 +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 1jJ5xw-0006sy-VH for pgsql-committers@lists.postgresql.org; Tue, 31 Mar 2020 01:45:20 +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 1jJ5xu-0004rD-AD; Tue, 31 Mar 2020 01:45:20 +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 02V1jFbb011758; Mon, 30 Mar 2020 21:45:15 -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: <10234.1585613690@sss.pgh.pa.us> References: <10234.1585613690@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Mon, 30 Mar 2020 20:14:50 -0400" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <11756.1585619115.1@sss.pgh.pa.us> Date: Mon, 30 Mar 2020 21:45:15 -0400 Message-ID: <11757.1585619115@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Specifically, I notice that in the last couple of failures involving > tests on "mcv_lists", we are considering stats on a 5000-row table. > With the standard setting default_statistics_target = 100, ANALYZE > will take a 3000-row random sample, meaning that its results are > *inherently* not 100% reproducible. No, wait, scratch that --- I misremembered the multiplier. Actually ANALYZE will try to acquire a 30000-row sample, so its sample *should* always include the entire table. Autovacuum or not, the stats ought to come out exactly the same every time in this test case. But they are not doing so, at least on some machines. We need to figure out why that is. Anyway, I remain suspicious that the instability is the fault of something in the statistics code, not of autovacuum. regards, tom lane