diff options
| author | Tom Lane | 2023-06-20 13:50:43 +0000 |
|---|---|---|
| committer | Tom Lane | 2023-06-20 13:50:43 +0000 |
| commit | b334612b8aee9f9a34378982d8938b201dfad323 (patch) | |
| tree | a47c67522e7886c2aee179cbb260e47218c16d1d /src/backend | |
| parent | 877bf52cffe587d33556e6259f610eb932699706 (diff) | |
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
Diffstat (limited to 'src/backend')
| -rw-r--r-- | src/backend/executor/execUtils.c | 4 | ||||
| -rw-r--r-- | src/backend/libpq/hba.c | 10 | ||||
| -rw-r--r-- | src/backend/replication/logical/tablesync.c | 8 | ||||
| -rw-r--r-- | src/backend/storage/file/fd.c | 5 | ||||
| -rw-r--r-- | src/backend/storage/ipc/standby.c | 6 | ||||
| -rw-r--r-- | src/backend/storage/smgr/md.c | 8 | ||||
| -rw-r--r-- | src/backend/utils/adt/pgstatfuncs.c | 2 |
7 files changed, 21 insertions, 22 deletions
diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 4758ab41321..c06b2288583 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -1354,8 +1354,8 @@ ExecGetExtraUpdatedCols(ResultRelInfo *relinfo, EState *estate) Bitmapset * ExecGetAllUpdatedCols(ResultRelInfo *relinfo, EState *estate) { - Bitmapset *ret; - MemoryContext oldcxt; + Bitmapset *ret; + MemoryContext oldcxt; oldcxt = MemoryContextSwitchTo(GetPerTupleMemoryContext(estate)); diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 1ef113649fb..f89f138f3c0 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -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; diff --git a/src/backend/replication/logical/tablesync.c b/src/backend/replication/logical/tablesync.c index db10a446b3d..6d461654ab4 100644 --- a/src/backend/replication/logical/tablesync.c +++ b/src/backend/replication/logical/tablesync.c @@ -1253,7 +1253,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos) WalRcvExecResult *res; char originname[NAMEDATALEN]; RepOriginId originid; - UserContext ucxt; + UserContext ucxt; bool must_use_password; bool run_as_owner; @@ -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) @@ -1482,7 +1482,7 @@ LogicalRepSyncTableStart(XLogRecPtr *origin_startpos) res->err))); walrcv_clear_result(res); - if(!run_as_owner) + if (!run_as_owner) RestoreUserContext(&ucxt); table_close(rel, NoLock); diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index db39186f058..3c2a2fbef73 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -415,7 +415,7 @@ pg_fsync(int fd) int pg_fsync_no_writethrough(int fd) { - int rc; + int rc; if (!enableFsync) return 0; @@ -456,7 +456,7 @@ pg_fsync_writethrough(int fd) int pg_fdatasync(int fd) { - int rc; + int rc; if (!enableFsync) return 0; @@ -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 diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 70b0da50fc1..4c06741a69f 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -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); } diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 7353ed31d89..30dbc02f823 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -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 diff --git a/src/backend/utils/adt/pgstatfuncs.c b/src/backend/utils/adt/pgstatfuncs.c index 49adc319fc8..2a4c8ef87ff 100644 --- a/src/backend/utils/adt/pgstatfuncs.c +++ b/src/backend/utils/adt/pgstatfuncs.c @@ -601,7 +601,7 @@ pg_stat_get_activity(PG_FUNCTION_ARGS) values[26] = CStringGetTextDatum(beentry->st_gssstatus->gss_princ); values[27] = BoolGetDatum(beentry->st_gssstatus->gss_enc); /* GSS Encryption in use */ values[28] = BoolGetDatum(beentry->st_gssstatus->gss_delegation); /* GSS credentials - * delegated */ + * delegated */ } else { |
