From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: test_aio: Add read_stream test infrastructure & tests
Date: Fri, 27 Mar 2026 22:54:01 +0000
Message-ID: <E1w6G40-001l2x-2F@gemulon.postgresql.org> (raw)
test_aio: Add read_stream test infrastructure & tests
While we have a lot of indirect coverage of read streams, there are corner
cases that are hard to test when only indirectly controlling and observing the
read stream. This commit adds an SQL callable SRF interface for a read stream
and uses that in a few tests.
To make some of the tests possible, the injection point infrastructure in
test_aio had to be expanded to allow blocking IO completion.
While at it, fix a wrong debug message in inj_io_short_read_hook().
Author: Andres Freund <andres@anarazel.de>
Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Discussion: https://postgr.es/m/zljergweqti7x67lg5ije2rzjusie37nslsnkjkkby4laqqbfw@3p3zu522yykv
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1f6f200cab67e67f1c20d9c9ca5013e0f23f51e4
Modified Files
--------------
src/test/modules/test_aio/meson.build | 1 +
src/test/modules/test_aio/t/004_read_stream.pl | 278 ++++++++++++++++++++
src/test/modules/test_aio/test_aio--1.0.sql | 19 +-
src/test/modules/test_aio/test_aio.c | 340 +++++++++++++++++++++----
src/tools/pgindent/typedefs.list | 1 +
5 files changed, 587 insertions(+), 52 deletions(-)
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: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: test_aio: Add read_stream test infrastructure & tests
In-Reply-To: <E1w6G40-001l2x-2F@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox