summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2022-06-30 11:03:03 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2022-06-30 11:03:03 -0400
commit82d0ffae3219e4bc153a1306ce23013d168e04a2 (patch)
tree09c88e2f26187826ec9e5512593d5412703908aa /src/test
parentf5135d2aba87f59944bdab4f54129fc43a3f03d0 (diff)
pgindent run prior to branching v15.
pgperltidy and reformat-dat-files too. Not many changes.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/subscription/t/013_partition.pl7
-rw-r--r--src/test/subscription/t/027_nosuperuser.pl5
-rw-r--r--src/test/subscription/t/031_column_list.pl17
3 files changed, 20 insertions, 9 deletions
diff --git a/src/test/subscription/t/013_partition.pl b/src/test/subscription/t/013_partition.pl
index f2b75c11dea..0dfbbabc3b0 100644
--- a/src/test/subscription/t/013_partition.pl
+++ b/src/test/subscription/t/013_partition.pl
@@ -851,7 +851,9 @@ $node_publisher->wait_for_catchup('sub2');
$result = $node_subscriber2->safe_psql('postgres',
"SELECT a, b, c FROM tab5 ORDER BY 1");
-is($result, qq(3|1|), 'updates of tab5 replicated correctly after altering table on subscriber');
+is($result, qq(3|1|),
+ 'updates of tab5 replicated correctly after altering table on subscriber'
+);
# Test that replication into the partitioned target table continues to
# work correctly when the published table is altered.
@@ -866,7 +868,8 @@ $node_publisher->wait_for_catchup('sub2');
$result = $node_subscriber2->safe_psql('postgres',
"SELECT a, b, c FROM tab5 ORDER BY 1");
-is($result, qq(3||1), 'updates of tab5 replicated correctly after altering table on publisher');
+is($result, qq(3||1),
+ 'updates of tab5 replicated correctly after altering table on publisher');
# Test that replication works correctly as long as the leaf partition
# has the necessary REPLICA IDENTITY, even though the actual target
diff --git a/src/test/subscription/t/027_nosuperuser.pl b/src/test/subscription/t/027_nosuperuser.pl
index 96ec23aab70..e8f3e4bba11 100644
--- a/src/test/subscription/t/027_nosuperuser.pl
+++ b/src/test/subscription/t/027_nosuperuser.pl
@@ -178,7 +178,10 @@ expect_replication("alice.unpartitioned", 2, 5, 7,
revoke_superuser("regress_admin");
publish_update("alice.unpartitioned", 5 => 9);
expect_failure(
- "alice.unpartitioned", 2, 5, 7,
+ "alice.unpartitioned",
+ 2,
+ 5,
+ 7,
qr/ERROR: ( [A-Z0-9]+:)? permission denied for table unpartitioned/msi,
"non-superuser admin fails to replicate update");
grant_superuser("regress_admin");
diff --git a/src/test/subscription/t/031_column_list.pl b/src/test/subscription/t/031_column_list.pl
index 7f031bc1951..9fa6e0b35ff 100644
--- a/src/test/subscription/t/031_column_list.pl
+++ b/src/test/subscription/t/031_column_list.pl
@@ -20,7 +20,7 @@ $node_subscriber->append_conf('postgresql.conf',
$node_subscriber->start;
my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres';
-my $offset = 0;
+my $offset = 0;
sub wait_for_subscription_sync
{
@@ -1169,13 +1169,15 @@ is( $node_subscriber->safe_psql(
# TEST: With a table included in multiple publications with different column
# lists, we should catch the error when creating the subscription.
-$node_publisher->safe_psql('postgres', qq(
+$node_publisher->safe_psql(
+ 'postgres', qq(
CREATE TABLE test_mix_1 (a int PRIMARY KEY, b int, c int);
CREATE PUBLICATION pub_mix_1 FOR TABLE test_mix_1 (a, b);
CREATE PUBLICATION pub_mix_2 FOR TABLE test_mix_1 (a, c);
));
-$node_subscriber->safe_psql('postgres', qq(
+$node_subscriber->safe_psql(
+ 'postgres', qq(
DROP SUBSCRIPTION sub1;
CREATE TABLE test_mix_1 (a int PRIMARY KEY, b int, c int);
));
@@ -1192,17 +1194,20 @@ ok( $stderr =~
# TEST: If the column list is changed after creating the subscription, we
# should catch the error reported by walsender.
-$node_publisher->safe_psql('postgres', qq(
+$node_publisher->safe_psql(
+ 'postgres', qq(
ALTER PUBLICATION pub_mix_1 SET TABLE test_mix_1 (a, c);
));
-$node_subscriber->safe_psql('postgres', qq(
+$node_subscriber->safe_psql(
+ 'postgres', qq(
CREATE SUBSCRIPTION sub1 CONNECTION '$publisher_connstr' PUBLICATION pub_mix_1, pub_mix_2;
));
$node_publisher->wait_for_catchup('sub1');
-$node_publisher->safe_psql('postgres', qq(
+$node_publisher->safe_psql(
+ 'postgres', qq(
ALTER PUBLICATION pub_mix_1 SET TABLE test_mix_1 (a, b);
INSERT INTO test_mix_1 VALUES(1, 1, 1);
));