mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-11-27 07:21:09 +08: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:
parent
877bf52cff
commit
b334612b8a
@ -2693,9 +2693,8 @@ load_hba(void)
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* File contained one or more errors, so bail out.
|
* File contained one or more errors, so bail out. MemoryContextDelete
|
||||||
* MemoryContextDelete is enough to clean up everything, including
|
* is enough to clean up everything, including regexes.
|
||||||
* regexes.
|
|
||||||
*/
|
*/
|
||||||
MemoryContextDelete(hbacxt);
|
MemoryContextDelete(hbacxt);
|
||||||
return false;
|
return false;
|
||||||
@ -3057,9 +3056,8 @@ load_ident(void)
|
|||||||
if (!ok)
|
if (!ok)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* File contained one or more errors, so bail out.
|
* File contained one or more errors, so bail out. MemoryContextDelete
|
||||||
* MemoryContextDelete is enough to clean up everything, including
|
* is enough to clean up everything, including regexes.
|
||||||
* regexes.
|
|
||||||
*/
|
*/
|
||||||
MemoryContextDelete(ident_context);
|
MemoryContextDelete(ident_context);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1437,8 +1437,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Make sure that the copy command runs as the table owner, unless
|
* Make sure that the copy command runs as the table owner, unless the
|
||||||
* the user has opted out of that behaviour.
|
* user has opted out of that behaviour.
|
||||||
*/
|
*/
|
||||||
run_as_owner = MySubscription->runasowner;
|
run_as_owner = MySubscription->runasowner;
|
||||||
if (!run_as_owner)
|
if (!run_as_owner)
|
||||||
|
@ -500,6 +500,7 @@ pg_flush_data(int fd, off_t offset, off_t nbytes)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
retry:
|
retry:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
|
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
|
||||||
* tells the OS that writeback for the specified blocks should be
|
* tells the OS that writeback for the specified blocks should be
|
||||||
|
@ -1197,9 +1197,9 @@ standby_redo(XLogReaderState *record)
|
|||||||
/*
|
/*
|
||||||
* The startup process currently has no convenient way to schedule
|
* The startup process currently has no convenient way to schedule
|
||||||
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
|
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
|
||||||
* regular cadence, making this a convenient location to report
|
* regular cadence, making this a convenient location to report stats.
|
||||||
* stats. While these records aren't generated with wal_level=minimal,
|
* While these records aren't generated with wal_level=minimal, stats
|
||||||
* stats also cannot be accessed during WAL replay.
|
* also cannot be accessed during WAL replay.
|
||||||
*/
|
*/
|
||||||
pgstat_report_stat(true);
|
pgstat_report_stat(true);
|
||||||
}
|
}
|
||||||
|
@ -564,10 +564,10 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
|
|||||||
Assert(segstartblock + numblocks <= RELSEG_SIZE);
|
Assert(segstartblock + numblocks <= RELSEG_SIZE);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If available and useful, use posix_fallocate() (via FileFallocate())
|
* If available and useful, use posix_fallocate() (via
|
||||||
* to extend the relation. That's often more efficient than using
|
* FileFallocate()) to extend the relation. That's often more
|
||||||
* write(), as it commonly won't cause the kernel to allocate page
|
* efficient than using write(), as it commonly won't cause the kernel
|
||||||
* cache space for the extended pages.
|
* to allocate page cache space for the extended pages.
|
||||||
*
|
*
|
||||||
* However, we don't use FileFallocate() for small extensions, as it
|
* However, we don't use FileFallocate() for small extensions, as it
|
||||||
* defeats delayed allocation on some filesystems. Not clear where
|
* defeats delayed allocation on some filesystems. Not clear where
|
||||||
|
@ -113,10 +113,12 @@ if ($ENV{with_icu} eq 'yes')
|
|||||||
|
|
||||||
command_like(
|
command_like(
|
||||||
[
|
[
|
||||||
'initdb', '--no-sync', '-A', 'trust',
|
'initdb', '--no-sync',
|
||||||
|
'-A', 'trust',
|
||||||
'--locale-provider=icu', '--locale=und',
|
'--locale-provider=icu', '--locale=und',
|
||||||
'--lc-collate=C', '--lc-ctype=C', '--lc-messages=C',
|
'--lc-collate=C', '--lc-ctype=C',
|
||||||
'--lc-numeric=C', '--lc-monetary=C', '--lc-time=C',
|
'--lc-messages=C', '--lc-numeric=C',
|
||||||
|
'--lc-monetary=C', '--lc-time=C',
|
||||||
"$tempdir/data4"
|
"$tempdir/data4"
|
||||||
],
|
],
|
||||||
qr/^\s+ICU locale:\s+und\n/ms,
|
qr/^\s+ICU locale:\s+und\n/ms,
|
||||||
|
@ -89,12 +89,14 @@ if ($ENV{with_icu} eq 'yes')
|
|||||||
|
|
||||||
$node2->command_ok(
|
$node2->command_ok(
|
||||||
[
|
[
|
||||||
'createdb', '-T', 'template0', '--locale-provider', 'icu',
|
'createdb', '-T',
|
||||||
'--locale', 'en', '--lc-collate', 'C', '--lc-ctype', 'C',
|
'template0', '--locale-provider',
|
||||||
'foobar57'
|
'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
|
else
|
||||||
{
|
{
|
||||||
|
@ -221,8 +221,7 @@ ALTER SUBSCRIPTION admin_sub ENABLE;
|
|||||||
|
|
||||||
# Because the initial data sync is working as the table owner, all
|
# Because the initial data sync is working as the table owner, all
|
||||||
# data should be copied.
|
# data should be copied.
|
||||||
$node_subscriber->wait_for_subscription_sync($node_publisher,
|
$node_subscriber->wait_for_subscription_sync($node_publisher, 'admin_sub');
|
||||||
'admin_sub');
|
|
||||||
expect_replication("alice.unpartitioned", 3, 7, 13,
|
expect_replication("alice.unpartitioned", 3, 7, 13,
|
||||||
"table owner can do the initial data copy");
|
"table owner can do the initial data copy");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user