pgsql: Refactor background psql TAP functions

Поиск
Список
Период
Сортировка
От Daniel Gustafsson
Тема pgsql: Refactor background psql TAP functions
Дата
Msg-id E1pksad-001uk0-CL@gemulon.postgresql.org
обсуждение исходный текст
Ответы Re: pgsql: Refactor background psql TAP functions  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Список pgsql-committers
Refactor background psql TAP functions

This breaks out the background and interactive psql functionality into a
new class, PostgreSQL::Test::BackgroundPsql.  Sessions are still initiated
via PostgreSQL::Test::Cluster, but once started they can be manipulated by
the new helper functions which intend to make querying easier.  A sample
session for a command which can be expected to finish at a later time can
be seen below.

  my $session = $node->background_psql('postgres');
  $bsession->query_until(qr/start/, q(
    \echo start
        CREATE INDEX CONCURRENTLY idx ON t(a);
  ));
  $bsession->quit;

Patch by Andres Freund with some additional hacking by me.

Author: Andres Freund <andres@anarazel.de>
Reviewed-by: Andrew Dunstan <andrew@dunslane.net>
Discussion: https://postgr.es/m/20230130194350.zj5v467x4jgqt3d6@awork3.anarazel.de

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/664d757531e11ea5ef6971884ddb2a7af6fae69a

Modified Files
--------------
contrib/amcheck/t/003_cic_2pc.pl                   |  70 ++---
src/bin/psql/t/010_tab_completion.pl               |  28 +-
src/test/perl/PostgreSQL/Test/BackgroundPsql.pm    | 299 +++++++++++++++++++++
src/test/perl/PostgreSQL/Test/Cluster.pm           |  79 ++----
.../recovery/t/010_logical_decoding_timelines.pl   |   1 -
src/test/recovery/t/031_recovery_conflict.pl       | 102 ++-----
src/test/subscription/t/015_stream.pl              |  51 ++--
7 files changed, 388 insertions(+), 242 deletions(-)


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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: pgsql: Fix underspecified sort order in test query
Следующее
От: Andres Freund
Дата:
Сообщение: pgsql: Improve IO accounting for temp relation writes