Skip to content

Commit 538ecc1

Browse files
committed
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 <euler@timbira.com.br> Discussion: https://www.postgresql.org/message-id/flat/1257eaee-4874-e791-e83a-46720c72cac7@2ndquadrant.com
1 parent 6ae578a commit 538ecc1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,8 +700,10 @@ sub start
700700
my $name = $self->name;
701701
BAIL_OUT("node \"$name\" is already running") if defined $self->{_pid};
702702
print("### Starting node \"$name\"\n");
703+
# Note: We set the cluster_name here, not in postgresql.conf (in
704+
# sub init) so that it does not get copied to standbys.
703705
my $ret = TestLib::system_log('pg_ctl', '-D', $self->data_dir, '-l',
704-
$self->logfile, 'start');
706+
$self->logfile, '-o', "--cluster-name=$name", 'start');
705707

706708
if ($ret != 0)
707709
{

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy