From: | Andres Freund <andres(at)anarazel(dot)de> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: Question: test "aggregates" failed in 32-bit machine |
Date: | 2022-09-30 16:35:50 |
Message-ID: | 20220930163550.g77hpm76kdfek5l2@awork3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
On 2022-09-30 12:13:11 -0400, Tom Lane wrote:
> "kuroda(dot)hayato(at)fujitsu(dot)com" <kuroda(dot)hayato(at)fujitsu(dot)com> writes:
> > Hmm, I was not sure about additional conditions, sorry.
> > I could reproduce with followings steps:
>
> I tried this on a 32-bit VM with gcc 11.3, but couldn't reproduce.
> You said earlier
>
> >> OS: RHEL 6.10 server
> >> Arch: i686
> >> Gcc: 4.4.7
>
> That is an awfully old compiler; I fear I no longer have anything
> comparable on a working platform.
>
> The most likely theory, I think, is that that compiler is generating
> slightly different floating-point code causing different plans to
> be costed slightly differently than what the test case is expecting.
> Probably, the different orderings of the keys in this test case have
> exactly the same cost, or almost exactly, so that different roundoff
> error could be enough to change the selected plan.
Yea. I suspect that's because that compiler version doesn't have
-fexcess-precision=standard:
> CFLAGS = -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -g -O2
It's possible one could work around the issue with -msse -mfpmath=sse instead
of -fexcess-precision=standard.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-09-30 16:57:13 | Re: Question: test "aggregates" failed in 32-bit machine |
Previous Message | Tom Lane | 2022-09-30 16:13:11 | Re: Question: test "aggregates" failed in 32-bit machine |