Some of the TAP tests have been historically setting the environment
variable PGDATABASE to 'postgres', which is not needed because
PostgreSQL::Test::Cluster already sets it when initialized. This commit
removes these explicit setups.
Note that the dependency of cluster -a with PGDATABASE (from
1caef31d9e55) is still documented.
Author: Bharath Rupireddy
Discussion: https://postgr.es/m/CALj2ACXLAz5dW3ZP+Fec8g6jQMMmDyCVT+qdbye2h7QJJmhsdw@mail.gmail.com
$node->init;
$node->start;
-# clusterdb -a is not compatible with -d, hence enforce environment variable
-# correctly.
-$ENV{PGDATABASE} = 'postgres';
-
+# clusterdb -a is not compatible with -d. This relies on PGDATABASE to be
+# set, something PostgreSQL::Test::Cluster does.
$node->issues_sql_like(
[ 'clusterdb', '-a' ],
qr/statement: CLUSTER.*statement: CLUSTER/s,
use PostgreSQL::Test::Utils;
use Test::More;
-$ENV{PGDATABASE} = 'postgres';
-
# Ensure that a cascading standby is able to follow a newly-promoted standby
# on a new timeline.
use Test::More;
use Time::HiRes qw(usleep);
-$ENV{PGDATABASE} = 'postgres';
-
# Initialize primary node, setting wal-segsize to 1MB
my $node_primary = PostgreSQL::Test::Cluster->new('primary');
$node_primary->init(allows_streaming => 1, extra => ['--wal-segsize=1']);