-
Notifications
You must be signed in to change notification settings - Fork 162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix regression tests for different fetch size on 32-bit platforms #227
base: master
Are you sure you want to change the base?
Conversation
Net diff between server_options.out and server_options_1.out is: --- expected/server_options.out 2021-10-01 16:19:20.320972814 +0200 +++ expected/server_options_1.out 2021-10-01 16:22:04.428838428 +0200 @@ -235,11 +235,11 @@ -- Negative test cases for fetch_size option, should error out. ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '-60000'); -ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615 +ERROR: "fetch_size" requires an integer value between 1 to 4294967295 ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '123abc'); -ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615 +ERROR: "fetch_size" requires an integer value between 1 to 4294967295 ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '999999999999999999999'); -ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615 +ERROR: "fetch_size" requires an integer value between 1 to 4294967295 -- Cleanup fetch_size test objects. DROP FOREIGN TABLE table30000; DROP SERVER fetch101;
This fixes the regression tests on 32-bit platforms. A more correct fix would be to make the max fetch size int64_max instead of INT_MAX, but that's more invasive. |
Thanks, Christoph for your patch. But as of now, we do not test mysql_fdw mysql_fdw runs as a part of the PostgreSQL or EDB Postgres Advanced We do not have any near-term plans to do active testing and certify Regards, [1] https://buildfarm.postgresql.org/cgi-bin/show_status.pl |
Even if you don't test it there, you could still merge it? |
Well, that would fetch some additional maintenance every time we make Regards, |
Alternatively, you could drop the offending test (the 3 fetch size errors), or fix the variable to always be 64 bit. |
Fwiw the 32-bit problem got worse with 2.7.0:
That's on PG12 and 13 where the remaining tests pass; on PG14 it's even worse since the connection gets terminated because of a JIT error. I haven't read the code yet, but this smells like a bug. |
The same regression diff appears on armhf with PG14:
|
I just wanted to state that (for obvious reasons) this affects Ubuntu just as much. After reading the discussion so far I wanted to ask - as it seems armhf (or 32bit in general) shall not be supported - if you'd want us (= the Distributions) to disable building and providing mysql_fdw on armhf? |
"failed to resolve name" and "failed to look up symbol" are from PG's jit machinery. @anarazel, is that a bug in PG? |
https://codesearch.debian.net/search?q=mulodi4&literal=1 has some insights that this is a general problem with clang on 32-bit:
|
@df7cb Hm. If you compile a c program using __builtin_mul_overflow on those platforms with clang, does it end up using libgcc? Does it make a difference if you add --rtlib=libgcc or --rtlib=compiler-rt to the clang invocations? |
It does not, but my test might be too simple:
--rtlib doesn't make a difference. |
@df7cb Oh, I thought this was arm specific... Do you see failures on 32bit x86? I think the example fails to fail to generate a reference to mulodi only because a) the overflow path isn't actually used b) it's only 32bit.
|
I've seen it on both i386 and armhf. Your code now shows the problem in the 32-bit chroot:
|
It appears to be getting fixed in clang. See https://bugs.llvm.org/show_bug.cgi?id=28629 - sid's clang-14 doesn't fail anymore. As the above example quite clearly shows, this is unrelated to postgres / jit... |
Thanks @anarazel ! |
Net diff between server_options.out and server_options_1.out is:
--- expected/server_options.out 2021-10-01 16:19:20.320972814 +0200
+++ expected/server_options_1.out 2021-10-01 16:22:04.428838428 +0200
@@ -235,11 +235,11 @@
-- Negative test cases for fetch_size option, should error out.
ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '-60000');
-ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615
+ERROR: "fetch_size" requires an integer value between 1 to 4294967295
ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '123abc');
-ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615
+ERROR: "fetch_size" requires an integer value between 1 to 4294967295
ALTER FOREIGN TABLE table30000 OPTIONS ( SET fetch_size '999999999999999999999');
-ERROR: "fetch_size" requires an integer value between 1 to 18446744073709551615
+ERROR: "fetch_size" requires an integer value between 1 to 4294967295
-- Cleanup fetch_size test objects.
DROP FOREIGN TABLE table30000;
DROP SERVER fetch101;