test_aio: Add read_stream test infrastructure & tests
Andres Freund <andres@anarazel.de>
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
Files
| Path | Change | +/− |
|---|---|---|
| src/test/modules/test_aio/meson.build | modified | +1 −0 |
| src/test/modules/test_aio/t/004_read_stream.pl | added | +278 −0 |
| src/test/modules/test_aio/test_aio--1.0.sql | modified | +17 −2 |
| src/test/modules/test_aio/test_aio.c | modified | +290 −50 |
| src/tools/pgindent/typedefs.list | modified | +1 −0 |
Discussion
- Don't synchronously wait for already-in-progress IO in read stream 33 messages · 2025-09-11 → 2026-03-31