Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc30be2a

Browse files
tglsfdcpull[bot]
authored andcommitted
Pre-beta2 mechanical code beautification.
Run pgindent and pgperltidy. It seems we're still some waysaway from all committers doing this automatically. Now thatwe have a buildfarm animal that will whine about poorly-indentedcode, we'll try to keep the tree more tidy.Discussion:https://postgr.es/m/3156045.1687208823@sss.pgh.pa.us
1 parent03bd98a commitc30be2a

File tree

11 files changed

+39
-37
lines changed

11 files changed

+39
-37
lines changed

‎src/backend/executor/execUtils.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,8 +1354,8 @@ ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate)
13541354
Bitmapset*
13551355
ExecGetAllUpdatedCols(ResultRelInfo*relinfo,EState*estate)
13561356
{
1357-
Bitmapset*ret;
1358-
MemoryContextoldcxt;
1357+
Bitmapset*ret;
1358+
MemoryContextoldcxt;
13591359

13601360
oldcxt=MemoryContextSwitchTo(GetPerTupleMemoryContext(estate));
13611361

‎src/backend/libpq/hba.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,9 +2693,8 @@ load_hba(void)
26932693
if (!ok)
26942694
{
26952695
/*
2696-
* File contained one or more errors, so bail out.
2697-
* MemoryContextDelete is enough to clean up everything, including
2698-
* regexes.
2696+
* File contained one or more errors, so bail out. MemoryContextDelete
2697+
* is enough to clean up everything, including regexes.
26992698
*/
27002699
MemoryContextDelete(hbacxt);
27012700
return false;
@@ -3057,9 +3056,8 @@ load_ident(void)
30573056
if (!ok)
30583057
{
30593058
/*
3060-
* File contained one or more errors, so bail out.
3061-
* MemoryContextDelete is enough to clean up everything, including
3062-
* regexes.
3059+
* File contained one or more errors, so bail out. MemoryContextDelete
3060+
* is enough to clean up everything, including regexes.
30633061
*/
30643062
MemoryContextDelete(ident_context);
30653063
return false;

‎src/backend/replication/logical/tablesync.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1253,7 +1253,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
12531253
WalRcvExecResult*res;
12541254
charoriginname[NAMEDATALEN];
12551255
RepOriginIdoriginid;
1256-
UserContextucxt;
1256+
UserContextucxt;
12571257
boolmust_use_password;
12581258
boolrun_as_owner;
12591259

@@ -1437,8 +1437,8 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
14371437
}
14381438

14391439
/*
1440-
* Make sure that the copy command runs as the table owner, unless
1441-
*theuser has opted out of that behaviour.
1440+
* Make sure that the copy command runs as the table owner, unless the
1441+
* user has opted out of that behaviour.
14421442
*/
14431443
run_as_owner=MySubscription->runasowner;
14441444
if (!run_as_owner)
@@ -1482,7 +1482,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos)
14821482
res->err)));
14831483
walrcv_clear_result(res);
14841484

1485-
if(!run_as_owner)
1485+
if(!run_as_owner)
14861486
RestoreUserContext(&ucxt);
14871487

14881488
table_close(rel,NoLock);

‎src/backend/storage/file/fd.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ pg_fsync(int fd)
415415
int
416416
pg_fsync_no_writethrough(intfd)
417417
{
418-
intrc;
418+
intrc;
419419

420420
if (!enableFsync)
421421
return0;
@@ -456,7 +456,7 @@ pg_fsync_writethrough(int fd)
456456
int
457457
pg_fdatasync(intfd)
458458
{
459-
intrc;
459+
intrc;
460460

461461
if (!enableFsync)
462462
return0;
@@ -500,6 +500,7 @@ pg_flush_data(int fd, off_t offset, off_t nbytes)
500500
return;
501501

502502
retry:
503+
503504
/*
504505
* sync_file_range(SYNC_FILE_RANGE_WRITE), currently linux specific,
505506
* tells the OS that writeback for the specified blocks should be

‎src/backend/storage/ipc/standby.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,9 +1197,9 @@ standby_redo(XLogReaderState *record)
11971197
/*
11981198
* The startup process currently has no convenient way to schedule
11991199
* stats to be reported. XLOG_RUNNING_XACTS records issued at a
1200-
* regular cadence, making this a convenient location to report
1201-
*stats.While these records aren't generated with wal_level=minimal,
1202-
*statsalso cannot be accessed during WAL replay.
1200+
* regular cadence, making this a convenient location to report stats.
1201+
* While these records aren't generated with wal_level=minimal, stats
1202+
* also cannot be accessed during WAL replay.
12031203
*/
12041204
pgstat_report_stat(true);
12051205
}

‎src/backend/storage/smgr/md.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -564,10 +564,10 @@ mdzeroextend(SMgrRelation reln, ForkNumber forknum,
564564
Assert(segstartblock+numblocks <=RELSEG_SIZE);
565565

566566
/*
567-
* If available and useful, use posix_fallocate() (via FileFallocate())
568-
* to extend the relation. That's often more efficient than using
569-
* write(), as it commonly won't cause the kernel to allocate page
570-
* cache space for the extended pages.
567+
* If available and useful, use posix_fallocate() (via
568+
*FileFallocate())to extend the relation. That's often more
569+
*efficient than usingwrite(), as it commonly won't cause the kernel
570+
*to allocate pagecache space for the extended pages.
571571
*
572572
* However, we don't use FileFallocate() for small extensions, as it
573573
* defeats delayed allocation on some filesystems. Not clear where

‎src/backend/utils/adt/pgstatfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -601,7 +601,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS)
601601
values[26]=CStringGetTextDatum(beentry->st_gssstatus->gss_princ);
602602
values[27]=BoolGetDatum(beentry->st_gssstatus->gss_enc);/* GSS Encryption in use */
603603
values[28]=BoolGetDatum(beentry->st_gssstatus->gss_delegation);/* GSS credentials
604-
* delegated */
604+
* delegated */
605605
}
606606
else
607607
{

‎src/bin/initdb/t/001_initdb.pl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,12 @@
113113

114114
command_like(
115115
[
116-
'initdb','--no-sync','-A','trust',
116+
'initdb','--no-sync',
117+
'-A','trust',
117118
'--locale-provider=icu','--locale=und',
118-
'--lc-collate=C','--lc-ctype=C','--lc-messages=C',
119-
'--lc-numeric=C','--lc-monetary=C','--lc-time=C',
119+
'--lc-collate=C','--lc-ctype=C',
120+
'--lc-messages=C','--lc-numeric=C',
121+
'--lc-monetary=C','--lc-time=C',
120122
"$tempdir/data4"
121123
],
122124
qr/^\s+ICU locale:\s+und\n/ms,

‎src/bin/scripts/t/020_createdb.pl

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,12 +89,14 @@
8989

9090
$node2->command_ok(
9191
[
92-
'createdb','-T','template0','--locale-provider','icu',
93-
'--locale','en','--lc-collate','C','--lc-ctype','C',
94-
'foobar57'
92+
'createdb','-T',
93+
'template0','--locale-provider',
94+
'icu','--locale',
95+
'en','--lc-collate',
96+
'C','--lc-ctype',
97+
'C','foobar57'
9598
],
96-
'create database with locale as ICU locale'
97-
);
99+
'create database with locale as ICU locale');
98100
}
99101
else
100102
{

‎src/include/utils/backend_status.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ typedef struct PgBackendGSSStatus
7777
chargss_princ[NAMEDATALEN];/* GSSAPI Principal used to auth */
7878
boolgss_auth;/* If GSSAPI authentication was used */
7979
boolgss_enc;/* If encryption is being used */
80-
boolgss_delegation;/* If credentials delegated */
80+
boolgss_delegation;/* If credentials delegated */
8181

8282
}PgBackendGSSStatus;
8383

‎src/test/subscription/t/033_run_as_table_owner.pl

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ sub revoke_superuser
196196
# Remove the subscrition and truncate the table for the initial data sync
197197
# tests.
198198
$node_subscriber->safe_psql(
199-
'postgres',qq(
199+
'postgres',qq(
200200
DROP SUBSCRIPTION admin_sub;
201201
TRUNCATE alice.unpartitioned;
202202
));
203203

204204
# Create a new subscription "admin_sub" owned by regress_admin2. It's
205205
# disabled so that we revoke superuser privilege after creation.
206206
$node_subscriber->safe_psql(
207-
'postgres',qq(
207+
'postgres',qq(
208208
SET SESSION AUTHORIZATION regress_admin2;
209209
CREATE SUBSCRIPTION admin_sub CONNECTION '$publisher_connstr' PUBLICATION alice
210210
WITH (run_as_owner = false, password_required = false, copy_data = true, enabled = false);
@@ -214,16 +214,15 @@ sub revoke_superuser
214214
# ability to SET ROLE. Then enable the subscription "admin_sub".
215215
revoke_superuser("regress_admin2");
216216
$node_subscriber->safe_psql(
217-
'postgres',qq(
217+
'postgres',qq(
218218
GRANT regress_alice TO regress_admin2 WITH INHERIT FALSE, SET TRUE;
219219
ALTER SUBSCRIPTION admin_sub ENABLE;
220220
));
221221

222222
# Because the initial data sync is working as the table owner, all
223223
# data should be copied.
224-
$node_subscriber->wait_for_subscription_sync($node_publisher,
225-
'admin_sub');
224+
$node_subscriber->wait_for_subscription_sync($node_publisher,'admin_sub');
226225
expect_replication("alice.unpartitioned", 3, 7, 13,
227-
"table owner can do the initial data copy");
226+
"table owner can do the initial data copy");
228227

229228
done_testing();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp