diff options
Diffstat (limited to 'src/bin/pg_rewind')
-rw-r--r-- | src/bin/pg_rewind/filemap.c | 6 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 3 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/009_growing_files.pl | 5 | ||||
-rw-r--r-- | src/bin/pg_rewind/t/RewindTest.pm | 13 |
4 files changed, 16 insertions, 11 deletions
diff --git a/src/bin/pg_rewind/filemap.c b/src/bin/pg_rewind/filemap.c index d61067f6b2e..62529310415 100644 --- a/src/bin/pg_rewind/filemap.c +++ b/src/bin/pg_rewind/filemap.c @@ -139,9 +139,9 @@ static const struct exclude_list_item excludeFiles[] = {"pg_internal.init", true}, /* defined as RELCACHE_INIT_FILENAME */ /* - * If there is a backup_label or tablespace_map file, it indicates that - * a recovery failed and this cluster probably can't be rewound, but - * exclude them anyway if they are found. + * If there is a backup_label or tablespace_map file, it indicates that a + * recovery failed and this cluster probably can't be rewound, but exclude + * them anyway if they are found. */ {"backup_label", false}, /* defined as BACKUP_LABEL_FILE */ {"tablespace_map", false}, /* defined as TABLESPACE_MAP */ diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl index 805935c6fd5..5aafe586e14 100644 --- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl +++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl @@ -20,7 +20,8 @@ sub run_test { my $test_mode = shift; - my $primary_xlogdir = "${PostgreSQL::Test::Utils::tmp_check}/xlog_primary"; + my $primary_xlogdir = + "${PostgreSQL::Test::Utils::tmp_check}/xlog_primary"; rmtree($primary_xlogdir); RewindTest::setup_cluster($test_mode); diff --git a/src/bin/pg_rewind/t/009_growing_files.pl b/src/bin/pg_rewind/t/009_growing_files.pl index a5a58dbe060..9422828712a 100644 --- a/src/bin/pg_rewind/t/009_growing_files.pl +++ b/src/bin/pg_rewind/t/009_growing_files.pl @@ -51,12 +51,13 @@ append_to_file "$standby_pgdata/tst_both_dir/file1", 'a'; # copy operation and the result will be an error. my $ret = run_log( [ - 'pg_rewind', '--debug', + 'pg_rewind', '--debug', '--source-pgdata', $standby_pgdata, '--target-pgdata', $primary_pgdata, '--no-sync', ], - '2>>', "$standby_pgdata/tst_both_dir/file1"); + '2>>', + "$standby_pgdata/tst_both_dir/file1"); ok(!$ret, 'Error out on copying growing file'); # Ensure that the files are of different size, the final error message should diff --git a/src/bin/pg_rewind/t/RewindTest.pm b/src/bin/pg_rewind/t/RewindTest.pm index 8fd1f4b9de4..98b66b01f82 100644 --- a/src/bin/pg_rewind/t/RewindTest.pm +++ b/src/bin/pg_rewind/t/RewindTest.pm @@ -101,8 +101,8 @@ sub check_query ], '>', \$stdout, '2>', \$stderr; - is($result, 1, "$test_name: psql exit code"); - is($stderr, '', "$test_name: psql no stderr"); + is($result, 1, "$test_name: psql exit code"); + is($stderr, '', "$test_name: psql no stderr"); is($stdout, $expected_stdout, "$test_name: query result matches"); return; @@ -115,7 +115,8 @@ sub setup_cluster # Initialize primary, data checksums are mandatory $node_primary = - PostgreSQL::Test::Cluster->new('primary' . ($extra_name ? "_${extra_name}" : '')); + PostgreSQL::Test::Cluster->new( + 'primary' . ($extra_name ? "_${extra_name}" : '')); # Set up pg_hba.conf and pg_ident.conf for the role running # pg_rewind. This role is used for all the tests, and has @@ -163,7 +164,8 @@ sub create_standby my $extra_name = shift; $node_standby = - PostgreSQL::Test::Cluster->new('standby' . ($extra_name ? "_${extra_name}" : '')); + PostgreSQL::Test::Cluster->new( + 'standby' . ($extra_name ? "_${extra_name}" : '')); $node_primary->backup('my_backup'); $node_standby->init_from_backup($node_primary, 'my_backup'); my $connstr_primary = $node_primary->connstr(); @@ -305,7 +307,8 @@ sub run_pg_rewind # segments from the old primary to the archives. These # will be used by pg_rewind. rmtree($node_primary->archive_dir); - PostgreSQL::Test::RecursiveCopy::copypath($node_primary->data_dir . "/pg_wal", + PostgreSQL::Test::RecursiveCopy::copypath( + $node_primary->data_dir . "/pg_wal", $node_primary->archive_dir); # Fast way to remove entire directory content |