Postgre and AIO

From: "Weck, Luis" <luis(dot)weck(at)pismo(dot)io>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Postgre and AIO
Date: 2025-09-29 12:07:09
Message-ID: IA3PR10MB8113DB0A2CA1B6B0DE3831078D1BA@IA3PR10MB8113.namprd10.prod.outlook.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-general

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?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Xuneng Zhou 2025-09-29 12:25:46 Re: Postgre and AIO
Previous Message Mark Idiong 2025-09-29 06:22:36 No POSTGIS in PostgreSQL 18