pgaio_io_get_id() type (was Re: Datum as struct)

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Cc: Andres Freund <andres(at)anarazel(dot)de>
Subject: pgaio_io_get_id() type (was Re: Datum as struct)
Date: 2025-08-05 17:20:20
Message-ID: 70c784b3-f60b-4652-b8a6-75e5f051243e@eisentraut.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 31.07.25 19:17, Tom Lane wrote:
> Also I see a "// XXX" in pg_get_aios, which I guess is a note
> to confirm the data type to use for ioh_id?

Yes, the stuff returned from pgaio_io_get_id() should be int, but some
code uses uint32, and also UINT32_MAX as a special marker. Here is a
patch that tries to straighten that out by using int consistently and -1
as a special marker.

Attachment Content-Type Size
0001-Use-consistent-type-for-pgaio_io_get_id-result.patch text/plain 3.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-08-05 17:24:07 Re: Bug in brin_minmax_multi_distance_numeric()
Previous Message Peter Geoghegan 2025-08-05 17:19:45 Re: index prefetching