Re: [PATCH] jit: fix build with LLVM-21 - Mailing list pgsql-hackers

From Anthonin Bonnefoy
Subject Re: [PATCH] jit: fix build with LLVM-21
Date
Msg-id CAO6_XqqbrO3O48f+XM0fp6P8ha61sZqYPuri++P0+KMVM0xcdw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] jit: fix build with LLVM-21  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers
Hi,

I've tested the patch: it fixes the compilation on arm and I'm
correctly linked to llvm21:

ldd /var/lib/postgresql/.local/lib/llvmjit.so | grep libLLVM
        libLLVM.so.21.1 => /lib/aarch64-linux-gnu/libLLVM.so.21.1
(0x0000ec34112d0000)

Testing the query that used to trigger the jit segfault, the llvm
backport is working as expected.

pgbench -i --partitions=256
psql options=-cjit_above_cost=0 -c 'SELECT count(bid) from pgbench_accounts;'
 count
--------
 100000

As a comparison, if I forcefully disable
USE_LLVM_BACKPORT_SECTION_MEMORY_MANAGER, I have the expected crash as
the issue is still present in LLVM (the fix would be to switch to
JITLink).

psql options=-cjit_above_cost=0 -c 'SELECT count(bid) from pgbench_accounts;'
server closed the connection unexpectedly
        This probably means the server terminated abnormally
        before or while processing the request.
connection to server was lost



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: Make TID Scans recalculate the TIDs less often
Next
From: Ashutosh Sharma
Date:
Subject: Re: How can end users know the cause of LR slot sync delays?