diff options
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r-- | src/test/perl/PostgresNode.pm | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 3f3a1d81f68..1407359aef6 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -1386,6 +1386,12 @@ the B<timed_out> parameter is also given. If B<timeout> is set and this parameter is given, the scalar it references is set to true if the psql call times out. +=item replication => B<value> + +If set, add B<replication=value> to the conninfo string. +Passing the literal value C<database> results in a logical replication +connection. + =item extra_params => ['--single-transaction'] If given, it must be an array reference containing additional parameters to B<psql>. @@ -1414,10 +1420,17 @@ sub psql my $stdout = $params{stdout}; my $stderr = $params{stderr}; + my $replication = $params{replication}; my $timeout = undef; my $timeout_exception = 'psql timed out'; - my @psql_params = - ('psql', '-XAtq', '-d', $self->connstr($dbname), '-f', '-'); + my @psql_params = ( + 'psql', + '-XAtq', + '-d', + $self->connstr($dbname) + . (defined $replication ? " replication=$replication" : ""), + '-f', + '-'); # If the caller wants an array and hasn't passed stdout/stderr # references, allocate temporary ones to capture them so we |