pgsql: Extend Cluster.pm's background_psql() to be able to start asynch

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Extend Cluster.pm's background_psql() to be able to start asynch
Date: 2024-11-06 06:31:49
Message-ID: E1t8Za0-000Pv1-V4@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Extend Cluster.pm's background_psql() to be able to start asynchronously

This commit extends the constructor routine of BackgroundPsql.pm with a
new "wait" parameter. If set to 0, the routine returns without waiting
for psql to start, ready to consume input.

background_psql() in Cluster.pm gains the same "wait" parameter. The
default behavior is still to wait for psql to start. It becomes now
possible to not wait, giving to TAP scripts the possibility to perform
actions between a BackgroundPsql startup and its wait_connect() call.

Author: Jacob Champion
Discussion: https://postgr.es/m/CAOYmi+=60deN20WDyCoHCiecgivJxr=98s7s7-C8SkXwrCfHXg@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ba08edb065459fca62191c020362022efd42b522

Modified Files
--------------
src/test/perl/PostgreSQL/Test/BackgroundPsql.pm | 28 ++++++++++++++++++-------
src/test/perl/PostgreSQL/Test/Cluster.pm | 10 ++++++++-
2 files changed, 30 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2024-11-06 10:16:08 pgsql: Remove unused #include's from bin .c files
Previous Message David Rowley 2024-11-05 20:16:17 pgsql: Fix hypothetical bug in ExprState building for hashing