summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2017-10-05 13:56:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2018-01-30 10:52:26 +0000
commit4c4a08c74c921d2c031b4b6ddb2b8f6e989b98c4 (patch)
tree9c9efc372385dd0dad2b23c2233873a00bbf4e36
parentReleasing progress-linux version 184-0+dschinn1. (diff)
downloadpostgresql-common-4c4a08c74c921d2c031b4b6ddb2b8f6e989b98c4.zip
postgresql-common-4c4a08c74c921d2c031b4b6ddb2b8f6e989b98c4.tar.xz
Merging upstream version 185.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
-rwxr-xr-xpg_ctlcluster9
-rw-r--r--t/030_errors.t11
2 files changed, 1 insertions, 19 deletions
diff --git a/pg_ctlcluster b/pg_ctlcluster
index fe40b3a..1a088fa 100755
--- a/pg_ctlcluster
+++ b/pg_ctlcluster
@@ -37,14 +37,6 @@ $ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
chdir '/';
-# Putting recovery.conf into /etc/postgresql is a common mistake, error out
-sub start_check_wrong_recovery_conf {
- if (-f "$info{configdir}/recovery.conf" and # recovery.conf in config dir
- not -f "$info{configdir}/PG_VERSION") { # config dir is not PGDATA (could be symlinked)
- error "recovery.conf file found in config directory $info{configdir}, it should be in data directory $info{pgdata} instead";
- }
-}
-
# If a pid file is already present, delete it if it is stale/invalid, or exit
# with a notice if it belongs to an already running postgres.
sub start_check_pid_file {
@@ -112,7 +104,6 @@ sub cluster_port_ready {
}
sub start {
- start_check_wrong_recovery_conf;
start_check_pid_file;
# check conflicting port
diff --git a/t/030_errors.t b/t/030_errors.t
index 7f58c44..2850b28 100644
--- a/t/030_errors.t
+++ b/t/030_errors.t
@@ -6,7 +6,7 @@ require File::Temp;
use lib 't';
use TestLib;
-use Test::More tests => 148;
+use Test::More tests => 146;
use PgCommon;
my $version = $MAJORS[-1];
@@ -124,15 +124,6 @@ like_program_out 'postgres', 'pg_lsclusters -h', 0, qr/down/, 'cluster is down';
is_program_out 'postgres', "pg_ctlcluster $version main stop", 2,
"Cluster is not running.\n", 'pg_ctlcluster stop fails on stopped cluster';
-# recovery.conf in wrong location
-open F, '>', "/etc/postgresql/$version/main/recovery.conf";
-print F "\n";
-close F;
-like_program_out 'postgres', "pg_ctlcluster $version main start", 1,
- qr/recovery.conf file found in config directory/,
- 'pg_ctlcluster start fails with recovery.conf in config directory';
-unlink "/etc/postgresql/$version/main/recovery.conf";
-
# simulate crashed server
rename "/var/lib/postgresql/$version/main/postmaster.pid.orig",
"/var/lib/postgresql/$version/main/postmaster.pid" or die "rename: $!";