pgsql: test_aio: Add read_stream test infrastructure & tests

Поиск
Список
Период
Сортировка
От Andres Freund
Тема pgsql: test_aio: Add read_stream test infrastructure & tests
Дата
Msg-id E1w6G40-001l2x-2F@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
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(-)


В списке pgsql-committers по дате отправления: