Re: Making type Datum be 8 bytes everywhere

Peter Eisentraut <peter@eisentraut.org>

From: Peter Eisentraut <peter@eisentraut.org>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Cc: Andres Freund <andres@anarazel.de>, Robert Haas <robertmhaas@gmail.com>
Date: 2025-07-31T14:30:44Z
Lists: pgsql-hackers
On 18.07.25 02:09, Tom Lane wrote:
> The attached patch switches to 8-byte Datums everywhere, but
> doesn't make any effort to remove the now-dead code.

Is the plan to support only exactly Datums of size 8, or Datums of size 
at least 8?

There are some optimistic conditionals like

#if SIZEOF_DATUM >= 8

I don't expect it to work right now with larger sizes, but maybe it 
should?  (uuid pass-by-value!?!)




Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid faulty alignment of Datums in build_sorted_items().

  2. Grab the low-hanging fruit from forcing USE_FLOAT8_BYVAL to true.

  3. Grab the low-hanging fruit from forcing sizeof(Datum) to 8.

  4. Make type Datum be 8 bytes wide everywhere.

  5. Mop-up for Datum conversion cleanups.