Re: --with-llvm on 32-bit platforms?

Dmitry Mityugov <d.mityugov@postgrespro.ru>

From: Dmitry Mityugov <d.mityugov@postgrespro.ru>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Peter Eisentraut <peter@eisentraut.org>, pgsql-hackers@postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2025-09-17T20:18:22Z
Lists: pgsql-hackers
Thomas Munro wrote 2025-09-17 06:30:
> On Wed, Sep 17, 2025 at 3:47 AM Dmitry Mityugov
> <d.mityugov@postgrespro.ru> wrote:
>> I tried the patch and it works well, thanks a lot to everyone involved
>> in fixing this.
> 
> Thanks for the report and confirmation!  I also pinged Andres just in
> case he had any objections to the approach, given that he wrote this
> stuff.  Nope, so pushed.

Just wanted to add that this patch also fixes the problem when 
--with-llvm is enabled on 32-bit ARMs; tests from `make check` pass 
clearly when Postgres is build with this option enabled with both GCC 
and Clang on 32-bit Debian 13.1 for armhf architecture.

Regards,



Commits

  1. jit: Fix type used for Datum values in LLVM IR.

  2. Avoid faulty alignment of Datums in build_sorted_items().

  3. Make type Datum be 8 bytes wide everywhere.