aboutsummaryrefslogtreecommitdiff
path: root/src/bin/pg_rewind/RewindTest.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2018-05-09 10:14:46 -0400
committerAndrew Dunstan <andrew@dunslane.net>2018-05-09 10:14:46 -0400
commit35361ee78890ce5b559a710c8fa2fdfa843eb280 (patch)
tree22a5a33c4e327f6260f85e1bf36f54759da7f2be /src/bin/pg_rewind/RewindTest.pm
parent286bb240e1c8e279efa2d805c7f700abfb771925 (diff)
downloadpostgresql-35361ee78890ce5b559a710c8fa2fdfa843eb280.tar.gz
postgresql-35361ee78890ce5b559a710c8fa2fdfa843eb280.zip
Restrict vertical tightness to parentheses in Perl code
The vertical tightness settings collapse vertical whitespace between opening and closing brackets (parentheses, square brakets and braces). This can make data structures in particular harder to read, and is not very consistent with our style in non-Perl code. This patch restricts that setting to parentheses only, and reformats all the perl code accordingly. Not applying this to parentheses has some unfortunate effects, so the consensus is to keep the setting for parentheses and not for the others. The diff for this patch does highlight some places where structures should have trailing commas. They can be added manually, as there is no automatic tool to do so. Discussion: https://postgr.es/m/a2f2b87c-56be-c070-bfc0-36288b4b41c1@2ndQuadrant.com
Diffstat (limited to 'src/bin/pg_rewind/RewindTest.pm')
-rw-r--r--src/bin/pg_rewind/RewindTest.pm15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/bin/pg_rewind/RewindTest.pm b/src/bin/pg_rewind/RewindTest.pm
index 278ffd891c1..52531bba7a3 100644
--- a/src/bin/pg_rewind/RewindTest.pm
+++ b/src/bin/pg_rewind/RewindTest.pm
@@ -92,7 +92,8 @@ sub check_query
my $result = run [
'psql', '-q', '-A', '-t', '--no-psqlrc', '-d',
$node_master->connstr('postgres'),
- '-c', $query ],
+ '-c', $query
+ ],
'>', \$stdout, '2>', \$stderr;
# We don't use ok() for the exit code and stderr, because we want this
@@ -214,10 +215,12 @@ sub run_pg_rewind
# Stop the master and be ready to perform the rewind
$node_standby->stop;
command_ok(
- [ 'pg_rewind',
+ [
+ 'pg_rewind',
"--debug",
"--source-pgdata=$standby_pgdata",
- "--target-pgdata=$master_pgdata" ],
+ "--target-pgdata=$master_pgdata"
+ ],
'pg_rewind local');
}
elsif ($test_mode eq "remote")
@@ -225,9 +228,11 @@ sub run_pg_rewind
# Do rewind using a remote connection as source
command_ok(
- [ 'pg_rewind', "--debug",
+ [
+ 'pg_rewind', "--debug",
"--source-server", $standby_connstr,
- "--target-pgdata=$master_pgdata" ],
+ "--target-pgdata=$master_pgdata"
+ ],
'pg_rewind remote');
}
else