aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgresNode.pm
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2018-11-25 16:31:16 +0100
committerPeter Eisentraut <peter_e@gmx.net>2018-11-25 16:33:40 +0100
commit2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85 (patch)
tree5564005e2fe623af69b01d56c9c72baf8ec68402 /src/test/perl/PostgresNode.pm
parentab69ea9feeb9a02c6299b5c1b786005552343f22 (diff)
downloadpostgresql-2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85.tar.gz
postgresql-2dedf4d9a899b36d1a8ed29be5efbd1b31a8fe85.zip
Integrate recovery.conf into postgresql.conf
recovery.conf settings are now set in postgresql.conf (or other GUC sources). Currently, all the affected settings are PGC_POSTMASTER; this could be refined in the future case by case. Recovery is now initiated by a file recovery.signal. Standby mode is initiated by a file standby.signal. The standby_mode setting is gone. If a recovery.conf file is found, an error is issued. The trigger_file setting has been renamed to promote_trigger_file as part of the move. The documentation chapter "Recovery Configuration" has been integrated into "Server Configuration". pg_basebackup -R now appends settings to postgresql.auto.conf and creates a standby.signal file. Author: Fujii Masao <masao.fujii@gmail.com> Author: Simon Riggs <simon@2ndquadrant.com> Author: Abhijit Menon-Sen <ams@2ndquadrant.com> Author: Sergei Kornilov <sk@zsrv.org> Discussion: https://www.postgresql.org/message-id/flat/607741529606767@web3g.yandex.ru/
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r--src/test/perl/PostgresNode.pm26
1 files changed, 20 insertions, 6 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;
}