pgsql: aio: Add test_aio module

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Date: 2025-04-01T18:54:58Z
Lists: pgsql-hackers

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. tests: Cope with io_method in TEMP_CONFIG in test_aio

  2. aio: Add test_aio module

aio: Add test_aio module

To make the tests possible, a few functions from bufmgr.c/localbuf.c had to be
exported, via buf_internals.h.

Reviewed-by: Noah Misch <noah@leadboat.com>
Co-authored-by: Andres Freund <andres@anarazel.de>
Co-authored-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Discussion: https://postgr.es/m/uvrtrknj4kdytuboidbhwclo4gxhswwcpgadptsjvjqcluzmah%40brqs62irg4dt

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/93bc3d75d8e1aabdc256ff6da2282266dca82537

Modified Files
--------------
src/backend/storage/buffer/bufmgr.c           |    8 +-
src/backend/storage/buffer/localbuf.c         |    3 +-
src/include/storage/buf_internals.h           |    7 +
src/test/modules/Makefile                     |    1 +
src/test/modules/meson.build                  |    1 +
src/test/modules/test_aio/.gitignore          |    2 +
src/test/modules/test_aio/Makefile            |   26 +
src/test/modules/test_aio/meson.build         |   37 +
src/test/modules/test_aio/t/001_aio.pl        | 1503 +++++++++++++++++++++++++
src/test/modules/test_aio/t/002_io_workers.pl |  125 ++
src/test/modules/test_aio/test_aio--1.0.sql   |  108 ++
src/test/modules/test_aio/test_aio.c          |  806 +++++++++++++
src/test/modules/test_aio/test_aio.control    |    3 +
13 files changed, 2622 insertions(+), 8 deletions(-)