Re: aio: Don't silently drop wait_event_info

From: Andres Freund <andres(at)anarazel(dot)de>
To: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: aio: Don't silently drop wait_event_info
Date: 2026-08-19 13:27:04
Message-ID: 2r5k2bix34uvvd4qw2b66j3g4k6kxtu6kvnkobvv2buj6ycfaf@2blns2sohr7w
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On 2026-08-19 13:31:28 +0300, Nazir Bilal Yavuz wrote:
> 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.

Yep, that should be fixed.

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

I don't think that's quite the right fix though - PgAioOpData is for data that
differs between operations, but it seems this is something that's relevant
across all of the eventually supported operations. So I think it should be
implemented in a more generic place?

Greetings,

Andres Freund

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message cca5507 2026-08-19 13:40:34 timeout value overflow in wait for lsn
Previous Message Ashutosh Bapat 2026-08-19 13:24:47 Re: Fix GRAPH TABLE label and property error reporting