1
0
mirror of https://github.com/postgres/postgres.git synced 2025-05-03 22:24:49 +03:00

Pre-beta2 mechanical code beautification.

Run pgindent and pgperltidy.  It seems we're still some ways
away from all committers doing this automatically.  Now that
we have a buildfarm animal that will whine about poorly-indented
code, we'll try to keep the tree more tidy.

Discussion: https://postgr.es/m/3156045.1687208823@sss.pgh.pa.us
This commit is contained in:
Tom Lane 2023-06-20 09:50:43 -04:00
parent 877bf52cff
commit b334612b8a
11 changed files with 39 additions and 37 deletions

View File

@ -2693,9 +2693,8 @@ load_hba(void)
if (!ok)
{
/*
* File contained one or more errors, so bail out.
* MemoryContextDelete is enough to clean up everything, including
* regexes.
* File contained one or more errors, so bail out. MemoryContextDelete
* is enough to clean up everything, including regexes.
*/
MemoryContextDelete(hbacxt);
return false;
@ -3057,9 +3056,8 @@ load_ident(void)
if (!ok)
{
/*
* File contained one or more errors, so bail out.
* MemoryContextDelete is enough to clean up everything, including
* regexes.
* File contained one or more errors, so bail out. MemoryContextDelete
* is enough to clean up everything, including regexes.
*/
MemoryContextDelete(ident_context);
return false;

View File

@ -1437,8 +1437,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
}
/*
* Make sure that the copy command runs as the table owner, unless
* the user has opted out of that behaviour.
* Make sure that the copy command runs as the table owner, unless the
* user has opted out of that behaviour.
*/
run_as_owner = MySubscription->runasowner;
if (!run_as_owner)

View File

@ -500,6 +500,7 @@ pg_flush_data(int fd, off_t offset, off_t nbytes)
return;
retry:
/*
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
* tells the OS that writeback for the specified blocks should be

View File

@ -1197,9 +1197,9 @@ standby_redo(XLogReaderState *record)
/*
* The startup process currently has no convenient way to schedule
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
* regular cadence, making this a convenient location to report
* stats. While these records aren't generated with wal_level=minimal,
* stats also cannot be accessed during WAL replay.
* regular cadence, making this a convenient location to report stats.
* While these records aren't generated with wal_level=minimal, stats
* also cannot be accessed during WAL replay.
*/
pgstat_report_stat(true);
}

View File

@ -564,10 +564,10 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
Assert(segstartblock + numblocks <= RELSEG_SIZE);
/*
* If available and useful, use posix_fallocate() (via FileFallocate())
* to extend the relation. That's often more efficient than using
* write(), as it commonly won't cause the kernel to allocate page
* cache space for the extended pages.
* If available and useful, use posix_fallocate() (via
* FileFallocate()) to extend the relation. That's often more
* efficient than using write(), as it commonly won't cause the kernel
* to allocate page cache space for the extended pages.
*
* However, we don't use FileFallocate() for small extensions, as it
* defeats delayed allocation on some filesystems. Not clear where

View File

@ -113,10 +113,12 @@ if ($ENV{with_icu} eq 'yes')
command_like(
[
'initdb', '--no-sync', '-A', 'trust',
'initdb', '--no-sync',
'-A', 'trust',
'--locale-provider=icu', '--locale=und',
'--lc-collate=C', '--lc-ctype=C', '--lc-messages=C',
'--lc-numeric=C', '--lc-monetary=C', '--lc-time=C',
'--lc-collate=C', '--lc-ctype=C',
'--lc-messages=C', '--lc-numeric=C',
'--lc-monetary=C', '--lc-time=C',
"$tempdir/data4"
],
qr/^\s+ICU locale:\s+und\n/ms,

View File

@ -89,12 +89,14 @@ if ($ENV{with_icu} eq 'yes')
$node2->command_ok(
[
'createdb', '-T', 'template0', '--locale-provider', 'icu',
'--locale', 'en', '--lc-collate', 'C', '--lc-ctype', 'C',
'foobar57'
'createdb', '-T',
'template0', '--locale-provider',
'icu', '--locale',
'en', '--lc-collate',
'C', '--lc-ctype',
'C', 'foobar57'
],
'create database with locale as ICU locale'
);
'create database with locale as ICU locale');
}
else
{

View File

@ -221,8 +221,7 @@ ALTER SUBSCRIPTION admin_sub ENABLE;
# Because the initial data sync is working as the table owner, all
# data should be copied.
$node_subscriber->wait_for_subscription_sync($node_publisher,
'admin_sub');
$node_subscriber->wait_for_subscription_sync($node_publisher, 'admin_sub');
expect_replication("alice.unpartitioned", 3, 7, 13,
"table owner can do the initial data copy");