aboutsummaryrefslogtreecommitdiff
path: root/src
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
parentf5135d2aba87f59944bdab4f54129fc43a3f03d0 (diff)
downloadpostgresql-82d0ffae3219e4bc153a1306ce23013d168e04a2.tar.gz
postgresql-82d0ffae3219e4bc153a1306ce23013d168e04a2.zip
pgindent run prior to branching v15.
pgperltidy and reformat-dat-files too. Not many changes.
Diffstat (limited to 'src')
-rw-r--r--src/backend/access/transam/xact.c2
-rw-r--r--src/bin/pg_dump/t/010_dump_connstr.pl3
-rw-r--r--src/bin/pg_upgrade/t/002_pg_upgrade.pl2
-rw-r--r--src/bin/psql/t/001_basic.pl13
-rw-r--r--src/include/catalog/pg_proc.dat5
-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
8 files changed, 37 insertions, 17 deletions
diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c
index 47d80b0d257..bd60b55574c 100644
--- a/src/backend/access/transam/xact.c
+++ b/src/backend/access/transam/xact.c
@@ -122,7 +122,7 @@ bool bsysscan = false;
* lookups as fast as possible.
*/
static FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
-static int nParallelCurrentXids = 0;
+static int nParallelCurrentXids = 0;
static TransactionId *ParallelCurrentXids;
/*
diff --git a/src/bin/pg_dump/t/010_dump_connstr.pl b/src/bin/pg_dump/t/010_dump_connstr.pl
index 6e497447c35..f0e3aaf9324 100644
--- a/src/bin/pg_dump/t/010_dump_connstr.pl
+++ b/src/bin/pg_dump/t/010_dump_connstr.pl
@@ -30,7 +30,8 @@ my $dbname1 =
. generate_ascii_string(1, 9)
. generate_ascii_string(11, 12)
. generate_ascii_string(14, 33)
- . ($PostgreSQL::Test::Utils::windows_os
+ . (
+ $PostgreSQL::Test::Utils::windows_os
? ''
: '"x"') # IPC::Run mishandles '"' on Windows
. generate_ascii_string(35, 43) # skip ','
diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
index 3f11540e189..67e0be68568 100644
--- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl
+++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl
@@ -244,7 +244,7 @@ command_ok(
'-P', $newnode->port, '--check'
],
'run of pg_upgrade --check for new instance');
-ok( !-d $newnode->data_dir . "/pg_upgrade_output.d",
+ok(!-d $newnode->data_dir . "/pg_upgrade_output.d",
"pg_upgrade_output.d/ not removed after pg_upgrade --check success");
# Actual run, pg_upgrade_output.d is removed at the end.
diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl
index 57486ceffdb..f4478457175 100644
--- a/src/bin/psql/t/001_basic.pl
+++ b/src/bin/psql/t/001_basic.pl
@@ -90,10 +90,17 @@ SELECT 1',
# test \timing with query that fails
{
- my ($ret, $stdout, $stderr) = $node->psql('postgres', "\\timing on\nSELECT error");
+ my ($ret, $stdout, $stderr) =
+ $node->psql('postgres', "\\timing on\nSELECT error");
isnt($ret, 0, '\timing with query error: query failed');
- like($stdout, qr/^Time: \d+[.,]\d\d\d ms/m, '\timing with query error: timing output appears');
- unlike($stdout, qr/^Time: 0[.,]000 ms/m, '\timing with query error: timing was updated');
+ like(
+ $stdout,
+ qr/^Time: \d+[.,]\d\d\d ms/m,
+ '\timing with query error: timing output appears');
+ unlike(
+ $stdout,
+ qr/^Time: 0[.,]000 ms/m,
+ '\timing with query error: timing was updated');
}
# test that ENCODING variable is set and that it is updated when
diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat
index 87aa571a331..a77b2937234 100644
--- a/src/include/catalog/pg_proc.dat
+++ b/src/include/catalog/pg_proc.dat
@@ -11676,8 +11676,9 @@
{ oid => '6119', descr => 'get information of tables in a publication',
proname => 'pg_get_publication_tables', prorows => '1000', proretset => 't',
provolatile => 's', prorettype => 'record', proargtypes => 'text',
- proallargtypes => '{text,oid,int2vector,pg_node_tree}', proargmodes => '{i,o,o,o}',
- proargnames => '{pubname,relid,attrs,qual}', prosrc => 'pg_get_publication_tables' },
+ proallargtypes => '{text,oid,int2vector,pg_node_tree}',
+ proargmodes => '{i,o,o,o}', proargnames => '{pubname,relid,attrs,qual}',
+ prosrc => 'pg_get_publication_tables' },
{ oid => '6121',
descr => 'returns whether a relation can be part of a publication',
proname => 'pg_relation_is_publishable', provolatile => 's',
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);
));