diff options
author | Peter Eisentraut <peter@eisentraut.org> | 2025-08-21 19:40:12 +0200 |
---|---|---|
committer | Peter Eisentraut <peter@eisentraut.org> | 2025-08-21 19:45:25 +0200 |
commit | 47932f3cdc4c221dbd9207cb21e63c862fedd189 (patch) | |
tree | 2afb2ce7c3f89de52173ba519bbfe2bd9cef34af /src/backend/storage/aio/aio_funcs.c | |
parent | 12da45742cfd15d9fab151b25400d96a1febcbde (diff) |
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.
Reviewed-by: Andres Freund <andres@anarazel.de>
Discussion: https://www.postgresql.org/message-id/70c784b3-f60b-4652-b8a6-75e5f051243e%40eisentraut.org
Diffstat (limited to 'src/backend/storage/aio/aio_funcs.c')
-rw-r--r-- | src/backend/storage/aio/aio_funcs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/storage/aio/aio_funcs.c b/src/backend/storage/aio/aio_funcs.c index 905ea129c81..34f8f632733 100644 --- a/src/backend/storage/aio/aio_funcs.c +++ b/src/backend/storage/aio/aio_funcs.c @@ -56,7 +56,7 @@ pg_get_aios(PG_FUNCTION_ARGS) for (uint64 i = 0; i < pgaio_ctl->io_handle_count; i++) { PgAioHandle *live_ioh = &pgaio_ctl->io_handles[i]; - uint32 ioh_id = pgaio_io_get_id(live_ioh); + int ioh_id = pgaio_io_get_id(live_ioh); Datum values[PG_GET_AIOS_COLS] = {0}; bool nulls[PG_GET_AIOS_COLS] = {0}; ProcNumber owner; @@ -152,7 +152,7 @@ retry: nulls[0] = false; /* column: IO's id */ - values[1] = UInt32GetDatum(ioh_id); + values[1] = Int32GetDatum(ioh_id); /* column: IO's generation */ values[2] = Int64GetDatum(start_generation); |