mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Improve grammar of options for command arrays in TAP tests
This commit rewrites a good chunk of the command arrays in TAP tests with a grammar based on the following rules: - Fat commas are used between option names and their values, making it clear to both humans and perltidy that values and names are bound together. This is particularly useful for the readability of multi-line command arrays, and there are plenty of them in the TAP tests. Most of the test code is updated to use this style. Some commands used parenthesis to show the link, or attached values and options in a single string. These are updated to use fat commas instead. - Option names are switched to use their long names, making them more self-documented. Based on a suggestion by Andrew Dunstan. - Add some trailing commas after the last item in multi-line arrays, which is a common perl style. Not all the places are taken care of, but this covers a very good chunk of them. Author: Dagfinn Ilmari Mannsåker Reviewed-by: Michael Paquier, Peter Smith, Euler Taveira Discussion: https://postgr.es/m/87jzc46d8u.fsf@wibble.ilmari.org
This commit is contained in:
@ -255,12 +255,11 @@ sub run_pg_rewind
|
||||
command_ok(
|
||||
[
|
||||
'pg_rewind',
|
||||
"--debug",
|
||||
"--source-pgdata=$standby_pgdata",
|
||||
"--target-pgdata=$primary_pgdata",
|
||||
"--no-sync",
|
||||
"--config-file",
|
||||
"$tmp_folder/primary-postgresql.conf.tmp"
|
||||
'--debug',
|
||||
'--source-pgdata' => $standby_pgdata,
|
||||
'--target-pgdata' => $primary_pgdata,
|
||||
'--no-sync',
|
||||
'--config-file' => "$tmp_folder/primary-postgresql.conf.tmp",
|
||||
],
|
||||
'pg_rewind local');
|
||||
}
|
||||
@ -270,11 +269,13 @@ sub run_pg_rewind
|
||||
# recovery configuration automatically.
|
||||
command_ok(
|
||||
[
|
||||
'pg_rewind', "--debug",
|
||||
"--source-server", $standby_connstr,
|
||||
"--target-pgdata=$primary_pgdata", "--no-sync",
|
||||
"--write-recovery-conf", "--config-file",
|
||||
"$tmp_folder/primary-postgresql.conf.tmp"
|
||||
'pg_rewind',
|
||||
'--debug',
|
||||
'--source-server' => $standby_connstr,
|
||||
'--target-pgdata' => $primary_pgdata,
|
||||
'--no-sync',
|
||||
'--write-recovery-conf',
|
||||
'--config-file' => "$tmp_folder/primary-postgresql.conf.tmp",
|
||||
],
|
||||
'pg_rewind remote');
|
||||
|
||||
@ -327,14 +328,13 @@ sub run_pg_rewind
|
||||
command_ok(
|
||||
[
|
||||
'pg_rewind',
|
||||
"--debug",
|
||||
"--source-pgdata=$standby_pgdata",
|
||||
"--target-pgdata=$primary_pgdata",
|
||||
"--no-sync",
|
||||
"--no-ensure-shutdown",
|
||||
"--restore-target-wal",
|
||||
"--config-file",
|
||||
"$primary_pgdata/postgresql.conf"
|
||||
'--debug',
|
||||
'--source-pgdata' => $standby_pgdata,
|
||||
'--target-pgdata' => $primary_pgdata,
|
||||
'--no-sync',
|
||||
'--no-ensure-shutdown',
|
||||
'--restore-target-wal',
|
||||
'--config-file' => "$primary_pgdata/postgresql.conf",
|
||||
],
|
||||
'pg_rewind archive');
|
||||
}
|
||||
|
Reference in New Issue
Block a user