aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/perl/PostgresNode.pm26
-rw-r--r--src/test/recovery/t/001_stream_rep.pl4
-rw-r--r--src/test/recovery/t/003_recovery_targets.pl2
-rw-r--r--src/test/recovery/t/004_timeline_switch.pl4
-rw-r--r--src/test/recovery/t/005_replay_delay.pl2
-rw-r--r--src/test/recovery/t/009_twophase.pl6
-rw-r--r--src/test/recovery/t/010_logical_decoding_timelines.pl2
-rw-r--r--src/test/recovery/t/012_subtransactions.pl6
8 files changed, 32 insertions, 20 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm
index efdebc3877c..8a2c6fc1221 100644
--- a/src/test/perl/PostgresNode.pm
+++ b/src/test/perl/PostgresNode.pm
@@ -635,8 +635,6 @@ of a backup previously created on that node with $node->backup.
Does not start the node after initializing it.
-A recovery.conf is not created.
-
Streaming replication can be enabled on this node by passing the keyword
parameter has_streaming => 1. This is disabled by default.
@@ -834,10 +832,10 @@ sub enable_streaming
print "### Enabling streaming replication for node \"$name\"\n";
$self->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
primary_conninfo='$root_connstr application_name=$name'
-standby_mode=on
));
+ $self->set_standby_mode();
return;
}
@@ -863,10 +861,26 @@ sub enable_restoring
: qq{cp "$path/%f" "%p"};
$self->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
restore_command = '$copy_command'
-standby_mode = on
));
+ $self->set_standby_mode();
+ return;
+}
+
+=pod
+
+=item $node->set_standby_mode()
+
+Place standby.signal file.
+
+=cut
+
+sub set_standby_mode
+{
+ my ($self) = @_;
+
+ $self->append_conf('standby.signal', '');
return;
}
diff --git a/src/test/recovery/t/001_stream_rep.pl b/src/test/recovery/t/001_stream_rep.pl
index 8dff5fc7202..beb45551a24 100644
--- a/src/test/recovery/t/001_stream_rep.pl
+++ b/src/test/recovery/t/001_stream_rep.pl
@@ -131,7 +131,7 @@ is( $node_master->psql(
qq[SELECT pg_create_physical_replication_slot('$slotname_1');]),
0,
'physical slot created on master');
-$node_standby_1->append_conf('recovery.conf',
+$node_standby_1->append_conf('postgresql.conf',
"primary_slot_name = $slotname_1");
$node_standby_1->append_conf('postgresql.conf',
"wal_receiver_status_interval = 1");
@@ -142,7 +142,7 @@ is( $node_standby_1->psql(
qq[SELECT pg_create_physical_replication_slot('$slotname_2');]),
0,
'physical slot created on intermediate replica');
-$node_standby_2->append_conf('recovery.conf',
+$node_standby_2->append_conf('postgresql.conf',
"primary_slot_name = $slotname_2");
$node_standby_2->append_conf('postgresql.conf',
"wal_receiver_status_interval = 1");
diff --git a/src/test/recovery/t/003_recovery_targets.pl b/src/test/recovery/t/003_recovery_targets.pl
index e867479f206..f6f2e8b745b 100644
--- a/src/test/recovery/t/003_recovery_targets.pl
+++ b/src/test/recovery/t/003_recovery_targets.pl
@@ -23,7 +23,7 @@ sub test_recovery_standby
foreach my $param_item (@$recovery_params)
{
- $node_standby->append_conf('recovery.conf', qq($param_item));
+ $node_standby->append_conf('postgresql.conf', qq($param_item));
}
$node_standby->start;
diff --git a/src/test/recovery/t/004_timeline_switch.pl b/src/test/recovery/t/004_timeline_switch.pl
index a7ccb7b4a3b..79cbffb827b 100644
--- a/src/test/recovery/t/004_timeline_switch.pl
+++ b/src/test/recovery/t/004_timeline_switch.pl
@@ -47,12 +47,10 @@ $node_standby_1->psql('postgres', "SELECT pg_promote(wait_seconds => 300)",
is($psql_out, 't', "promotion of standby with pg_promote");
# Switch standby 2 to replay from standby 1
-rmtree($node_standby_2->data_dir . '/recovery.conf');
my $connstr_1 = $node_standby_1->connstr;
$node_standby_2->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
primary_conninfo='$connstr_1 application_name=@{[$node_standby_2->name]}'
-standby_mode=on
recovery_target_timeline='latest'
));
$node_standby_2->restart;
diff --git a/src/test/recovery/t/005_replay_delay.pl b/src/test/recovery/t/005_replay_delay.pl
index 8909c4548bf..6c85c928c10 100644
--- a/src/test/recovery/t/005_replay_delay.pl
+++ b/src/test/recovery/t/005_replay_delay.pl
@@ -25,7 +25,7 @@ my $delay = 3;
$node_standby->init_from_backup($node_master, $backup_name,
has_streaming => 1);
$node_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_min_apply_delay = '${delay}s'
));
$node_standby->start;
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl
index 9ea3bd65fc1..dac2d4ec0d6 100644
--- a/src/test/recovery/t/009_twophase.pl
+++ b/src/test/recovery/t/009_twophase.pl
@@ -230,7 +230,7 @@ is($psql_rc, '0', "Restore of prepared transaction on promoted standby");
# restart old master as new standby
$cur_standby->enable_streaming($cur_master);
$cur_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$cur_standby->start;
@@ -268,7 +268,7 @@ is($psql_out, '1',
# restart old master as new standby
$cur_standby->enable_streaming($cur_master);
$cur_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$cur_standby->start;
@@ -308,7 +308,7 @@ is($psql_out, '1',
# restart old master as new standby
$cur_standby->enable_streaming($cur_master);
$cur_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$cur_standby->start;
diff --git a/src/test/recovery/t/010_logical_decoding_timelines.pl b/src/test/recovery/t/010_logical_decoding_timelines.pl
index a76eea86a5a..4fbd386332a 100644
--- a/src/test/recovery/t/010_logical_decoding_timelines.pl
+++ b/src/test/recovery/t/010_logical_decoding_timelines.pl
@@ -76,7 +76,7 @@ $node_replica->init_from_backup(
$node_master, $backup_name,
has_streaming => 1,
has_restoring => 1);
-$node_replica->append_conf('recovery.conf',
+$node_replica->append_conf('postgresql.conf',
q[primary_slot_name = 'phys_slot']);
$node_replica->start;
diff --git a/src/test/recovery/t/012_subtransactions.pl b/src/test/recovery/t/012_subtransactions.pl
index efc23d05598..e26cc9c2ce1 100644
--- a/src/test/recovery/t/012_subtransactions.pl
+++ b/src/test/recovery/t/012_subtransactions.pl
@@ -120,7 +120,7 @@ is($psql_out, '8128', "Visible");
($node_master, $node_standby) = ($node_standby, $node_master);
$node_standby->enable_streaming($node_master);
$node_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$node_standby->start;
@@ -171,7 +171,7 @@ is($psql_out, '-1', "Not visible");
($node_master, $node_standby) = ($node_standby, $node_master);
$node_standby->enable_streaming($node_master);
$node_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$node_standby->start;
@@ -212,7 +212,7 @@ is($psql_out, '-1', "Not visible");
($node_master, $node_standby) = ($node_standby, $node_master);
$node_standby->enable_streaming($node_master);
$node_standby->append_conf(
- 'recovery.conf', qq(
+ 'postgresql.conf', qq(
recovery_target_timeline='latest'
));
$node_standby->start;