From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients
Date: Fri, 24 Mar 2017 16:02:30 -0300
Message-ID: <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql> (raw)
In-Reply-To: <CA+Tgmobb0_6o2KfY8ezVKozJ0jCadL1DapxLY9PJufc3g5MHcQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
Robert Haas wrote:
> On Fri, Mar 24, 2017 at 1:16 PM, Alvaro Herrera <alvherre@alvh.no-ip.org> 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: alvherre@2ndquadrant.com, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
Subject: Re: [COMMITTERS] pgsql: Implement multivariate n-distinct coefficients
In-Reply-To: <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql>
References: <CA+Tgmobb0_6o2KfY8ezVKozJ0jCadL1DapxLY9PJufc3g5MHcQ@mail.gmail.com> <20170324190230.bbcxbbdf6267dqhh@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox