pgindent run prior to branching v15.

pgperltidy and reformat-dat-files too.  Not many changes.
This commit is contained in:
Tom Lane 2022-06-30 11:03:03 -04:00
parent f5135d2aba
commit 82d0ffae32
8 changed files with 37 additions and 17 deletions

View File

@ -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;
/*

View File

@ -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 ','

View File

@ -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.

View File

@ -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

View File

@ -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',

View File

@ -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

View File

@ -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");

View File

@ -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);
));