Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1crUVP-0001Sh-AO for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:04:11 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1crUVO-00036k-T8 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 Mar 2017 19:04:10 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1crUTt-0000RI-7v for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:02:37 +0000 Received: from mail-qt0-x22e.google.com ([2607:f8b0:400d:c0d::22e]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1crUTq-0004nu-JT for pgsql-hackers@postgresql.org; Fri, 24 Mar 2017 19:02:36 +0000 Received: by mail-qt0-x22e.google.com with SMTP id x35so9979701qtc.2 for ; Fri, 24 Mar 2017 12:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=Hgi4oqSvbEhibgal18teBNuEardAftUKlKXUDWFVIGo=; b=D4s9X7DnzfdcLZqhv7MddsoWhvzxRLCm6YI+moAr/3SzyR84uubGCbhbzIceOVvRf7 JUg6reMBKZrskKFO4Hw0nYDX4m5As0ND784H4PCkV2QP8hCphACr/PS3TEZYRGYCzfic jUpC/TeE8xnMplzNzAEks3NSnBvbm8eCahEJLIReskGQOzwhhc+u6p2XMOB/4NNiL790 YgYhjXxXKhAR0sw1J1IBKXUFNaf/lHAT9OBS8DHcByOhR9W7BuYjiPRgkfDG/Q31Sojy oMBdbrmqAGJSAA+65LvWvWFC4MaSwtW5gzfuRcdUiCI4d0OqieuXJd8ElkSFDUmqnnGf 75ow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=Hgi4oqSvbEhibgal18teBNuEardAftUKlKXUDWFVIGo=; b=effWTLEcpj2vOqPPQbvDemtwKrQf+sdvxwKUs5GqSURU/Ly9eHBhy5Ys7IixlEA0ak HqJXMKl5MHpgkjcIqnL/cRXB1fVHYjqBHH5E/Sfp8phYn/kpnKDby3ytZ+Zj8th7QDAA L91Rp/YQUq5giHcg79Lf9p4/7idlRzdvDyaW3XOvlC50O7+iQPCfa6dApfEHAv4X0G+T YL3yovP5aB3VWDIZPGepBlqTJMqiMB5Yl+rBLdvEK/5gDKb4rWl8KHu7juRMik2LvXEh Q9P1IaZpNVrI4iYhIXXo+EKqDNY5Me/QO6qfZAYKTW07dp6ZlqKGbujcKxKEo5nhyV2+ W/+A== X-Gm-Message-State: AFeK/H1bydFjwtu0meAIvcplCr9Ziq1u2Z0QqaNORZFQnGp6vQEUd+ld2p9iKfHaFw1TlNTB X-Received: by 10.237.37.146 with SMTP id x18mr9254178qtc.268.1490382153298; Fri, 24 Mar 2017 12:02:33 -0700 (PDT) Received: from alvin.alvh.no-ip.org (186-79-143-232.baf.movistar.cl. [186.79.143.232]) by smtp.gmail.com with ESMTPSA id t23sm2084978qka.37.2017.03.24.12.02.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Mar 2017 12:02:32 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 08C6811B8; Fri, 24 Mar 2017 16:02:30 -0300 (CLST) Date: Fri, 24 Mar 2017 16:02:30 -0300 From: Alvaro Herrera To: Robert Haas Cc: "pgsql-hackers@postgresql.org" Subject: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients Message-ID: <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: NeoMutt/20170206-195-7adf12 (1.7.2) X-Pg-Spam-Score: -0.4 (/) 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 Robert Haas wrote: > On Fri, Mar 24, 2017 at 1:16 PM, Alvaro Herrera wrote: > > Implement multivariate n-distinct coefficients > > 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. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers