public inbox for [email protected]
help / color / mirror / Atom feedFrom: Dominique Devienne <[email protected]>
To: Weck, Luis <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Postgre and AIO
Date: Mon, 29 Sep 2025 14:26:27 +0200
Message-ID: <CAFCRh--pj5G70NsWTrJDBgBtRVug3m432vRkQ=Du6OQ4a8LH9A@mail.gmail.com> (raw)
In-Reply-To: <IA3PR10MB8113DB0A2CA1B6B0DE3831078D1BA@IA3PR10MB8113.namprd10.prod.outlook.com>
References: <IA3PR10MB8113DB0A2CA1B6B0DE3831078D1BA@IA3PR10MB8113.namprd10.prod.outlook.com>
On Mon, Sep 29, 2025 at 2:07 PM Weck, Luis <[email protected]> wrote:
> Now that AIO landed in v18,
> [...] index updating happens one at a time.
> [...] it took a long time sequentially reading the index for each value
These have nothing to do with Async-IO IMHO.
For your first case, each index is its own file, so could already be
processed in parallel, in terms of IO.
For your second case, and in general, this is about the SQL processing
engine doing more in parallel. AFAIK, because of the current (mostly?)
single-threaded-process-based architecture, parallel processing means
forking worker processes, and that's not done too often.
AIO is not a magic bullet. It just means NOT blocking waiting for IO,
so you have the opportunity to do something else during that time. But
your code must be structured to be able to do something else already.
Which is not free, and tends to make the code more complex. In
single-threaded apps, like PostgreSQL backends, that means an event
loop, and while I'm sure there's one, for the client-backend socket
IO, I'm not sure the rest of the code is loop-based.
But these are comments from someone who doesn't know the code, so feel
free to ignore :). --DD
view thread (2+ messages)
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Postgre and AIO
In-Reply-To: <CAFCRh--pj5G70NsWTrJDBgBtRVug3m432vRkQ=Du6OQ4a8LH9A@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox