Re: Potential deadlock in pgaio_io_wait()

From: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
To: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Cc: Andres Freund <andres(at)anarazel(dot)de>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Potential deadlock in pgaio_io_wait()
Date: 2025-10-10 01:44:04
Message-ID: CA+hUKG+Hh7u3YpPLKQS+B7KJu0Bw99EjhuPuvBRVccDfgod95g@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-hackers

On Tue, Sep 23, 2025 at 2:53 AM Heikki Linnakangas <hlinnaka(at)iki(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message ocean_li_996 2025-10-10 03:01:19 Re:BUG #19070: issue with DETACH PARTITION CONCURRENTLY on a hash partition table
Previous Message Yuri Zamyatin 2025-10-10 01:34:47 Re: BUG #19078: Segfaults in tts_minimal_store_tuple() following pg_upgrade

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-10-10 02:03:06 Re: [PROPOSAL] Termination of Background Workers for ALTER/DROP DATABASE
Previous Message Chao Li 2025-10-10 01:02:26 Re: speedup COPY TO for partitioned table.