pgperltidy and reformat-dat-files too. Not many changes.
* lookups as fast as possible.
*/
static FullTransactionId XactTopFullTransactionId = {InvalidTransactionId};
-static int nParallelCurrentXids = 0;
+static int nParallelCurrentXids = 0;
static TransactionId *ParallelCurrentXids;
/*
. 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 ','
'-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.
# 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
{ 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',
$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.
$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
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");
$node_subscriber->start;
my $publisher_connstr = $node_publisher->connstr . ' dbname=postgres';
-my $offset = 0;
+my $offset = 0;
sub wait_for_subscription_sync
{
# 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);
));
# 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);
));