As a very exciting improvement for the open-source PostgreSQL database server, it has merged initial support for making use of IO_uring on Linux servers for asynchronous I/O and can provide for some nice performance improvements.
The very initial support for using IO_uring has been merged to PostgreSQL Git as of yesterday, 26 March. This is a very exciting feature addition ahead of PostgreSQL 18 to be introduced later in the year.
This IO_uring support requires building PostgreSQL Git with the “–with-liburing” for building against IO_uring’s liburing library. This Linux-specific feature also requires setting the “io_method=io_uring” PostgreSQL option for using IO_uring as the database server’s I/O method.
This commit added the optional liburing build dependency and then this follow-up commit is what goes ahead with the integration and adding the io_method=io_uring option. That commit explains:
“aio: Add io_method=io_uring
Performing AIO using io_uring can be considerably faster than io_method=worker, particularly when lots of small IOs are issued, as
a) the context-switch overhead for worker based AIO becomes more significant
b) the number of IO workers can become limitingio_uring, however, is linux specific and requires an additional compile-time dependency (liburing).
This implementation is fairly simple and there are substantial optimization opportunities.”
Prior discussions around IO_uring for PostgreSQL have shown off some very nice potential of the IO_uring/liburing path:
And there’s even room left for further performance optimizations.
It’s very exciting seeing this IO_uring support merged for mainline PostgreSQL and will be interesting to see how well-tuned the IO_uring method is by the time of the PostgreSQL 18.0 release. PostgreSQL 18.0 should be debuting in September.