Re: pgaio_io_get_id() type (was Re: Datum as struct)
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-08-08T20:07:11Z
Lists: pgsql-hackers
Hi, On 2025-08-05 19:20:20 +0200, Peter Eisentraut wrote: > 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. > From e1bb97e13af226cd15c9a59929aef48bc92c4ac2 Mon Sep 17 00:00:00 2001 > From: Peter Eisentraut <peter@eisentraut.org> > Date: Tue, 5 Aug 2025 19:16:38 +0200 > Subject: [PATCH] Use consistent type for pgaio_io_get_id() result > > The result of pgaio_io_get_id() was being assigned to a mix of int and > uint32 variables. This fixes it to use int consistently, which seems > the most correct. Also change the queue empty special value in > method_worker.c to -1 from UINT32_MAX. WFM. I guess I could see some value going with an unsigned value instead of a signed one, but it really doesn't matter... Greetings, Andres
Commits
-
Use consistent type for pgaio_io_get_id() result
- b942360f82a0 18.0 landed
- 47932f3cdc4c 19 (unreleased) landed
-
Mop-up for Datum conversion cleanups.
- 665c3dbba497 19 (unreleased) landed
-
Add missing Datum conversions
- ff89e182d420 19 (unreleased) landed
-
Remove useless/superfluous Datum conversions
- dcfc0f891273 19 (unreleased) landed
-
Fix incorrect lack of Datum conversion in _int_matchsel()
- 387883f68c85 13.22 landed
- 64dec8060c84 14.19 landed
- f0d55b68ef92 15.14 landed
- a3906b44c5b9 16.10 landed
- 276cdd4cc378 17.6 landed
- 992a18f5161c 18.0 landed
- fd2ab03fea23 19 (unreleased) landed
-
Improve tests of date_trunc() with infinity and unsupported units
- 67ffe1987d0a 18.0 landed
- 572c0f1b0e2a 19 (unreleased) landed
-
Fix incorrect Datum conversion in timestamptz_trunc_internal()
- 074db8604ad1 18.0 landed
- 2242b26ce472 19 (unreleased) landed
-
Fix various hash function uses
- 2ad6e80de9a6 19 (unreleased) landed
-
Fix mixups of FooGetDatum() vs. DatumGetFoo()
- 1469e312977c 19 (unreleased) landed