git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5450820)
Run pgperltidy
2024年6月30日 22:35:01 +0000 (07:35 +0900)
2024年6月30日 22:35:01 +0000 (07:35 +0900)
This is required before the creation of a new branch. pgindent is
clean, as well as is reformat-dat-files.

perltidy version is v20230309, as documented in pgindent's README.


diff --git a/src/bin/pg_basebackup/t/040_pg_createsubscriber.pl b/src/bin/pg_basebackup/t/040_pg_createsubscriber.pl
index 9e2d838503ebcc96b86ac8a7547b1fc758da94a5..8e8d3f0a02a89aa5b5a6f841af01a285fb3e3f4d 100644 (file)
--- a/src/bin/pg_basebackup/t/040_pg_createsubscriber.pl
+++ b/src/bin/pg_basebackup/t/040_pg_createsubscriber.pl
@@ -289,10 +289,13 @@ $node_p->restart;
# Create failover slot to test its removal
my $fslotname = 'failover_slot';
$node_p->safe_psql($db1,
- "SELECT pg_create_logical_replication_slot('$fslotname', 'pgoutput', false, false, true)");
+ "SELECT pg_create_logical_replication_slot('$fslotname', 'pgoutput', false, false, true)"
+);
$node_s->start;
$node_s->safe_psql('postgres', "SELECT pg_sync_replication_slots()");
-my $result = $node_s->safe_psql('postgres', "SELECT slot_name FROM pg_replication_slots WHERE slot_name = '$fslotname' AND synced AND NOT temporary");
+my $result = $node_s->safe_psql('postgres',
+ "SELECT slot_name FROM pg_replication_slots WHERE slot_name = '$fslotname' AND synced AND NOT temporary"
+);
is($result, 'failover_slot', 'failover slot is synced');
$node_s->stop;
@@ -381,7 +384,8 @@ $node_s->wait_for_subscription_sync($node_p, $subnames[1]);
# Confirm the failover slot has been removed
$result = $node_s->safe_psql($db1,
- "SELECT count(*) FROM pg_replication_slots WHERE slot_name = '$fslotname'");
+ "SELECT count(*) FROM pg_replication_slots WHERE slot_name = '$fslotname'"
+);
is($result, qq(0), 'failover slot was removed');
# Check result on database $db1
diff --git a/src/bin/pg_combinebackup/t/003_timeline.pl b/src/bin/pg_combinebackup/t/003_timeline.pl
index 83ab674a2448f65ad54f375524cf0b8265cd672e..b9c67341ad83a3a36310fcd4e058ac461ef2b15b 100644 (file)
--- a/src/bin/pg_combinebackup/t/003_timeline.pl
+++ b/src/bin/pg_combinebackup/t/003_timeline.pl
@@ -72,7 +72,8 @@ $node2->command_ok(
# Restore the incremental backup and use it to create a new node.
my $node3 = PostgreSQL::Test::Cluster->new('node3');
-$node3->init_from_backup($node1, 'backup3',
+$node3->init_from_backup(
+ $node1, 'backup3',
combine_with_prior => [ 'backup1', 'backup2' ],
combine_mode => $mode);
$node3->start();
diff --git a/src/bin/pg_combinebackup/t/004_manifest.pl b/src/bin/pg_combinebackup/t/004_manifest.pl
index 6d475163ab9eaa887b09ba3295c95e7b4eabf8d1..9b09ae2641d0dba281a0f2dde793015ee8b12865 100644 (file)
--- a/src/bin/pg_combinebackup/t/004_manifest.pl
+++ b/src/bin/pg_combinebackup/t/004_manifest.pl
@@ -58,7 +58,8 @@ sub combine_and_test_one_backup
combine_and_test_one_backup('nomanifest',
qr/could not open file.*backup_manifest/,
'--no-manifest');
-combine_and_test_one_backup('csum_none', undef, '--manifest-checksums=NONE', $mode);
+combine_and_test_one_backup('csum_none', undef, '--manifest-checksums=NONE',
+ $mode);
combine_and_test_one_backup('csum_sha224',
undef, '--manifest-checksums=SHA224', $mode);
diff --git a/src/bin/pg_combinebackup/t/005_integrity.pl b/src/bin/pg_combinebackup/t/005_integrity.pl
index 3caed13f6edd578b4647a0d74b0175c44999d1fb..25ebb8c04068d6a39b73382e1a4d6a3d467b58c9 100644 (file)
--- a/src/bin/pg_combinebackup/t/005_integrity.pl
+++ b/src/bin/pg_combinebackup/t/005_integrity.pl
@@ -84,13 +84,19 @@ my $resultpath = $node1->backup_dir . '/result';
# Can't combine 2 full backups.
$node1->command_fails_like(
- [ 'pg_combinebackup', $backup1path, $backup1path, '-o', $resultpath, $mode ],
+ [
+ 'pg_combinebackup', $backup1path, $backup1path, '-o',
+ $resultpath, $mode
+ ],
qr/is a full backup, but only the first backup should be a full backup/,
"can't combine full backups");
# Can't combine 2 incremental backups.
$node1->command_fails_like(
- [ 'pg_combinebackup', $backup2path, $backup2path, '-o', $resultpath, $mode ],
+ [
+ 'pg_combinebackup', $backup2path, $backup2path, '-o',
+ $resultpath, $mode
+ ],
qr/is an incremental backup, but the first backup should be a full backup/,
"can't combine full backups");
@@ -121,7 +127,10 @@ move("$backup2path/backup_manifest.orig", "$backup2path/backup_manifest")
# Can't omit a required backup.
$node1->command_fails_like(
- [ 'pg_combinebackup', $backup1path, $backup3path, '-o', $resultpath, $mode ],
+ [
+ 'pg_combinebackup', $backup1path, $backup3path, '-o',
+ $resultpath, $mode
+ ],
qr/starts at LSN.*but expected/,
"can't omit a required backup");
@@ -154,13 +163,21 @@ $node1->command_ok(
# Can combine result of previous step with second incremental.
$node1->command_ok(
- [ 'pg_combinebackup', $synthetic12path, $backup3path, '-o', $resultpath, $mode ],
+ [
+ 'pg_combinebackup', $synthetic12path,
+ $backup3path, '-o',
+ $resultpath, $mode
+ ],
"can combine synthetic backup with later incremental");
rmtree($resultpath);
# Can't combine result of 1+2 with 2.
$node1->command_fails_like(
- [ 'pg_combinebackup', $synthetic12path, $backup2path, '-o', $resultpath, $mode ],
+ [
+ 'pg_combinebackup', $synthetic12path,
+ $backup2path, '-o',
+ $resultpath, $mode
+ ],
qr/starts at LSN.*but expected/,
"can't combine synthetic backup with included incremental");
diff --git a/src/bin/pg_combinebackup/t/006_db_file_copy.pl b/src/bin/pg_combinebackup/t/006_db_file_copy.pl
index f44788e82bfc5f375f57e5ff1f0bf681921065b3..60bdc8d00f79a7fdb0b02042ea0c9e490fb1134f 100644 (file)
--- a/src/bin/pg_combinebackup/t/006_db_file_copy.pl
+++ b/src/bin/pg_combinebackup/t/006_db_file_copy.pl
@@ -49,7 +49,8 @@ $primary->command_ok(
# Recover the incremental backup.
my $restore = PostgreSQL::Test::Cluster->new('restore');
-$restore->init_from_backup($primary, 'backup2',
+$restore->init_from_backup(
+ $primary, 'backup2',
combine_with_prior => ['backup1'],
combine_mode => $mode);
$restore->start();
diff --git a/src/bin/pg_rewind/t/003_extrafiles.pl b/src/bin/pg_rewind/t/003_extrafiles.pl
index 5ddc61aa5a0ed7a9397107e5edaa5882860f74e6..097b0fde9d90a9960cad50c8bf136abb0d1b1fef 100644 (file)
--- a/src/bin/pg_rewind/t/003_extrafiles.pl
+++ b/src/bin/pg_rewind/t/003_extrafiles.pl
@@ -55,8 +55,8 @@ sub run_test
"$test_standby_datadir/tst_standby_dir/standby_subdir/standby_file4",
"in standby4";
# Skip testing .DS_Store files on macOS to avoid risk of side effects
- append_to_file
- "$test_standby_datadir/tst_standby_dir/.DS_Store", "macOS system file"
+ append_to_file "$test_standby_datadir/tst_standby_dir/.DS_Store",
+ "macOS system file"
unless ($Config{osname} eq 'darwin');
mkdir "$test_primary_datadir/tst_primary_dir";
diff --git a/src/bin/pg_verifybackup/t/003_corruption.pl b/src/bin/pg_verifybackup/t/003_corruption.pl
index fac823e9ce100c18b073e0a58fdcb552be9fcf9e..ae91e04338460694a72ed4b818b6c401ccac8ae6 100644 (file)
--- a/src/bin/pg_verifybackup/t/003_corruption.pl
+++ b/src/bin/pg_verifybackup/t/003_corruption.pl
@@ -108,8 +108,8 @@ for my $scenario (@scenario)
SKIP:
{
skip "unix-style permissions not supported on Windows", 4
- if ($scenario->{'skip_on_windows'} &&
- ($windows_os || $Config::Config{osname} eq 'cygwin'));
+ if ($scenario->{'skip_on_windows'}
+ && ($windows_os || $Config::Config{osname} eq 'cygwin'));
# Take a backup and check that it verifies OK.
my $backup_path = $primary->backup_dir . '/' . $name;
diff --git a/src/test/recovery/t/009_twophase.pl b/src/test/recovery/t/009_twophase.pl
index 21a65cd298b8721de1172f16d8f0e9632226ff53..12c2f0e40d145f7a1fd1d7bfb9a03f39fed8c3ea 100644 (file)
--- a/src/test/recovery/t/009_twophase.pl
+++ b/src/test/recovery/t/009_twophase.pl
@@ -330,32 +330,34 @@ $cur_primary->stop;
$cur_standby->restart;
# Acquire a snapshot in standby, before we commit the prepared transaction
-my $standby_session = $cur_standby->background_psql('postgres', on_error_die => 1);
+my $standby_session =
+ $cur_standby->background_psql('postgres', on_error_die => 1);
$standby_session->query_safe("BEGIN ISOLATION LEVEL REPEATABLE READ");
-$psql_out = $standby_session->query_safe(
- "SELECT count(*) FROM t_009_tbl_standby_mvcc");
+$psql_out =
+ $standby_session->query_safe("SELECT count(*) FROM t_009_tbl_standby_mvcc");
is($psql_out, '0',
"Prepared transaction not visible in standby before commit");
# Commit the transaction in primary
$cur_primary->start;
-$cur_primary->psql('postgres', "
+$cur_primary->psql(
+ 'postgres', "
SET synchronous_commit='remote_apply'; -- To ensure the standby is caught up
COMMIT PREPARED 'xact_009_standby_mvcc';
");
# Still not visible to the old snapshot
-$psql_out = $standby_session->query_safe(
- "SELECT count(*) FROM t_009_tbl_standby_mvcc");
+$psql_out =
+ $standby_session->query_safe("SELECT count(*) FROM t_009_tbl_standby_mvcc");
is($psql_out, '0',
"Committed prepared transaction not visible to old snapshot in standby");
# Is visible to a new snapshot
$standby_session->query_safe("COMMIT");
-$psql_out = $standby_session->query_safe(
- "SELECT count(*) FROM t_009_tbl_standby_mvcc");
+$psql_out =
+ $standby_session->query_safe("SELECT count(*) FROM t_009_tbl_standby_mvcc");
is($psql_out, '2',
- "Committed prepared transaction is visible to new snapshot in standby");
+ "Committed prepared transaction is visible to new snapshot in standby");
$standby_session->quit;
###############################################################################
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /