Hello, I have encountered this issue while working with this image: perconalab/percona-distribution-postgresql-with-postgis:17.9.
When PostgreSQL’s JIT compiler activates, loading /usr/pgsql-17/lib/llvmjit.so fails with:
ERROR: could not load library "/usr/pgsql-17/lib/llvmjit.so":
/usr/pgsql-17/lib/llvmjit.so: undefined symbol: _ZSt21__glibcxx_assert_failPKciS0_S0_
This causes intermittent errors on queries whose estimated cost exceeds jit_above_cost. In our case, PostGIS tile generation via a tileserver triggers it at certain zoom levels.
Doing some research, maybe the issue is that llvmjit.so was compiled against a libstdc++ version that exports _ZSt21__glibcxx_assert_failPKciS0_S0_ (introduced in GLIBCXX_3.4.33, GCC 14+), but the container ships libstdc++.so.6.0.29 which only supports up to GLIBCXX_3.4.29 (GCC 11).
Verified in the container with:
$ nm -D /usr/pgsql-17/lib/llvmjit.so | grep glibcxx_assert_fail
U _ZSt21__glibcxx_assert_failPKciS0_S0_
$ nm -D /usr/lib64/libstdc++.so.6 | grep glibcxx_assert_fail
(no output)
llvmjit.so has an unresolved dependency on _ZSt21__glibcxx_assert_failPKciS0_S0_.
The container resolves libstdc++.so.6 to /lib64/libstdc++.so.6, but that library only exports symbols up to GLIBCXX_3.4.29.
The installed packages confirm the mismatch: percona-postgresql17-llvmjit-17.9-1.el9.x86_64 with libstdc++-11.5.0...el9, on RHEL/UBI 9.7.
The container has libstdc++-11.5.0 symbol versions only up to GLIBCXX_3.4.29, while the llvmjit.so package appears to have been built with headers/runtime expectations from a newer libstdc++. So we consider the issue is not specific to PostGIS itself.
We can see you are using an image: perconalab/percona-distribution-postgresql-with-postgis:17.9.
May we ask you to try this image below instead? We tested on this image and didn’t see any issues.