Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crUcW-0001uD-Ai for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:11:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1crUcV-00009l-Tg for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:11:31 +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_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crUb1-0005vT-Hx for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:09:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crUaz-0001rB-83 for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:09:59 +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 v2OJ9sXo007914; Fri, 24 Mar 2017 15:09:54 -0400 From: Tom Lane To: Alvaro Herrera cc: Robert Haas , "pgsql-hackers@postgresql.org" Subject: Re: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients In-reply-to: <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql> References: <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql> Comments: In-reply-to Alvaro Herrera message dated "Fri, 24 Mar 2017 16:02:30 -0300" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7912.1490382594.1@sss.pgh.pa.us> Date: Fri, 24 Mar 2017 15:09:54 -0400 Message-ID: <7913.1490382594@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Alvaro Herrera writes: > Robert Haas wrote: >> dromedary and arapaima have failures like this, which seems likely >> related to this commit: >> >> EXPLAIN >> SELECT COUNT(*) FROM ndistinct GROUP BY a, d; >> QUERY PLAN >> --------------------------------------------------------------------- >> ! HashAggregate (cost=225.00..235.00 rows=1000 width=16) >> Group Key: a, d >> ! -> Seq Scan on ndistinct (cost=0.00..150.00 rows=10000 width=8) >> (3 rows) > Yes. What seems to be going on here, is that both arapaima and > dromedary are 32 bit machines; all the 64 bit ones are passing (except > for prion which showed a real relcache bug, which I already stomped). > Now, the difference is that the total cost in those machines for seqscan > is 155 instead of 150. Tomas suggests that this happens because > MAXALIGN is different, leading to packing tuples differently: the > expected cost (on our laptop's 64 bit) is 155, and the cost we get in 32 > bit arch is 150 -- so 5 pages of difference. We insert 1000 rows on the > table; 4 bytes per tuple would amount to 40 kB, which is exactly 5 > pages. > I'll push an alternate expected file for this test, which we think is > the simplest fix. Why not use COSTS OFF? Or I'll put that even more strongly: all the existing regression tests use COSTS OFF, exactly to avoid this sort of machine-dependent output. There had better be a really damn good reason not to use it here. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers