public inbox for [email protected]  
help / color / mirror / Atom feed
From: Xuneng Zhou <[email protected]>
To: Weck, Luis <[email protected]>
Cc: [email protected] <[email protected]>
Subject: Re: Postgre and AIO
Date: Mon, 29 Sep 2025 20:25:46 +0800
Message-ID: <CABPTF7U2XgofHH1sPBw46tfnWWGua22NOZA98o2o2PaYEXfStw@mail.gmail.com> (raw)
In-Reply-To: <IA3PR10MB8113DB0A2CA1B6B0DE3831078D1BA@IA3PR10MB8113.namprd10.prod.outlook.com>
References: <IA3PR10MB8113DB0A2CA1B6B0DE3831078D1BA@IA3PR10MB8113.namprd10.prod.outlook.com>

Hi,

On Mon, Sep 29, 2025 at 8:07 PM Weck, Luis <[email protected]> wrote:
>
> This is more of a question of capability and to make me understand how exactly AIO work in Postgres.
>
> Now that AIO landed in v18, I was thinking of a use case which has annoyed me sometimes, which is inserting  lots of data into a table with many indices. What I am specifically “complaining” is that index updating happens one at a time. Would it be possible/make sense to use AIO to do this?
>
> Another thing that happens often is that an index lookup for something like SELECT y FROM tbl WHERE x IN (1,2,…N)  where N is a big number such as 1000 or 2000, takes a while, because (at least for versions < 18) it took a long time sequentially reading the index  for each value. I ended up having to split the values into smaller chunks and ran multiple queries in parallel to maintain a lower latency overall.
>
> Anyway, does any of this make sense? Could Postgres extend the use of AIO to such cases?

To my knowledge, AIO for index scan is still in-progress and expected
to land in v19/20 or later?

[1] https://wiki.postgresql.org/wiki/AIO (not stay-up-to date)
[2] https://talkingpostgres.com/episodes/what-went-wrong-what-went-right-with-aio-with-andres-freund

Best,
Xuneng






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: <CABPTF7U2XgofHH1sPBw46tfnWWGua22NOZA98o2o2PaYEXfStw@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