Re: Potential deadlock in pgaio_io_wait() - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: Potential deadlock in pgaio_io_wait()
Date
Msg-id CA+hUKG+Hh7u3YpPLKQS+B7KJu0Bw99EjhuPuvBRVccDfgod95g@mail.gmail.com
Whole thread Raw
In response to Re: Potential deadlock in pgaio_io_wait()  (Heikki Linnakangas <hlinnaka@iki.fi>)
List pgsql-hackers
On Tue, Sep 23, 2025 at 2:53 AM Heikki Linnakangas <hlinnaka@iki.fi> wrote:
> I just independently noticed this same issue, wrote a little test to
> reproduce it, and was about to report it, when I noticed that you found
> this already. Attached is the repro script.

Nice.  Thanks!

> Both of the proposed patches seem fine to me. I'm inclined to go with
> the first patch (v2-0001-aio-Fix-pgaio_io_wait-for-staged-IOs.patch),
> without the extra optimization, unless we can actually measure a
> performance difference.

I like the second one slightly more, but I'm also happy to be
outvoted.  I'm working on committing the first one, but I ran into a
couple of CI failures[1] that I haven't understood yet.  It could be
my patch's fault or turn out to be something already in the tree...
looking into that...

[1] https://cirrus-ci.com/task/4737677834059776



pgsql-hackers by date:

Previous
From: Chao Li
Date:
Subject: Re: speedup COPY TO for partitioned table.
Next
From: Chao Li
Date:
Subject: Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE