aio: Don't silently drop wait_event_info

From: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: aio: Don't silently drop wait_event_info
Date: 2026-08-19 10:31:28
Message-ID: CAN55FZ0Rp+94rdQ-zeTX0sF9H1e4uWZxH8r1cVXZX0swfqww3g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

While working on something else in the AIO code I noticed that
FileStartReadV() accepts a wait_event_info argument but never passes
it. Instead pgaio_io_perform_synchronously() hardcodes the wait event
to WAIT_EVENT_DATA_FILE_READ, so a wait event supplied by the caller
is silently ignored.

This is not a live bug today. The only caller of FileStartReadV() is
md.c, and it passes exactly the WAIT_EVENT_DATA_FILE_READ that is
hardcoded anyway; pgaio_io_start_writev() has no callers at all yet.

Fix this by storing the wait event in PgAioOpData and reporting it.

--
Regards,
Nazir Bilal Yavuz
Microsoft

Attachment Content-Type Size
v1-0001-aio-Don-t-silently-drop-wait_event_info.patch text/x-patch 4.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-08-19 10:37:06 Re: Tighten ACL check in repack_is_permitted_for_relation()
Previous Message vignesh C 2026-08-19 10:17:35 Re: Support EXCEPT for TABLES IN SCHEMA publications