diff options
author | Peter Eisentraut | 2019-02-08 07:38:54 +0000 |
---|---|---|
committer | Peter Eisentraut | 2019-02-27 09:59:25 +0000 |
commit | 538ecc17c478e87cc3155c2b9cda7a1b1812d767 (patch) | |
tree | c604d2ac1f0d467f4682322da6bc294bbd65c947 | |
parent | 6ae578a91e653ce3f4cba8cab96ce41e0cc7103f (diff) |
Set cluster_name for PostgresNode.pm instances
This can help identifying test instances more easily at run time, and
it also provides some minimal test coverage for the cluster_name
feature.
Reviewed-by: Euler Taveira <[email protected]>
Discussion: https://www.postgresql.org/message-id/flat/[email protected]
-rw-r--r-- | src/test/perl/PostgresNode.pm | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 8a2c6fc122..0634aefd20 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -700,8 +700,10 @@ sub start my $name = $self->name; BAIL_OUT("node \"$name\" is already running") if defined $self->{_pid}; print("### Starting node \"$name\"\n"); + # Note: We set the cluster_name here, not in postgresql.conf (in + # sub init) so that it does not get copied to standbys. my $ret = TestLib::system_log('pg_ctl', '-D', $self->data_dir, '-l', - $self->logfile, 'start'); + $self->logfile, '-o', "--cluster-name=$name", 'start'); if ($ret != 0) { |