1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Initial pgindent run for v12.

This is still using the 2.0 version of pg_bsd_indent.
I thought it would be good to commit this separately,
so as to document the differences between 2.0 and 2.1 behavior.

Discussion: https://postgr.es/m/16296.1558103386@sss.pgh.pa.us
This commit is contained in:
Tom Lane
2019-05-22 12:55:34 -04:00
parent 66a4bad83a
commit be76af171c
221 changed files with 1433 additions and 1302 deletions

View File

@@ -2813,12 +2813,12 @@ RelationGetNumberOfBlocksInFork(Relation relation, ForkNumber forkNum)
case RELKIND_MATVIEW:
{
/*
* Not every table AM uses BLCKSZ wide fixed size
* blocks. Therefore tableam returns the size in bytes - but
* for the purpose of this routine, we want the number of
* blocks. Therefore divide, rounding up.
* Not every table AM uses BLCKSZ wide fixed size blocks.
* Therefore tableam returns the size in bytes - but for the
* purpose of this routine, we want the number of blocks.
* Therefore divide, rounding up.
*/
uint64 szbytes;
uint64 szbytes;
szbytes = table_relation_size(relation, forkNum);

View File

@@ -1731,7 +1731,7 @@ FileClose(File file)
* see LruDelete.
*/
elog(vfdP->fdstate & FD_TEMP_FILE_LIMIT ? LOG : data_sync_elevel(LOG),
"could not close file \"%s\": %m", vfdP->fileName);
"could not close file \"%s\": %m", vfdP->fileName);
}
--nfile;

View File

@@ -856,7 +856,7 @@ WaitEventAdjustEpoll(WaitEventSet *set, WaitEvent *event, int action)
if (rc < 0)
ereport(ERROR,
(errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */
/* translator: %s is a syscall name, such as "poll()" */
errmsg("%s failed: %m",
"epoll_ctl()")));
}
@@ -1089,7 +1089,7 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting = false;
ereport(ERROR,
(errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */
/* translator: %s is a syscall name, such as "poll()" */
errmsg("%s failed: %m",
"epoll_wait()")));
}
@@ -1215,7 +1215,7 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout,
waiting = false;
ereport(ERROR,
(errcode_for_socket_access(),
/* translator: %s is a syscall name, such as "poll()" */
/* translator: %s is a syscall name, such as "poll()" */
errmsg("%s failed: %m",
"poll()")));
}

View File

@@ -370,7 +370,7 @@ void
PostmasterDeathSignalInit(void)
{
#ifdef USE_POSTMASTER_DEATH_SIGNAL
int signum = POSTMASTER_DEATH_SIGNAL;
int signum = POSTMASTER_DEATH_SIGNAL;
/* Register our signal handler. */
pqsignal(signum, postmaster_death_handler);

View File

@@ -181,7 +181,7 @@ pg_rotate_logfile(PG_FUNCTION_ARGS)
ereport(ERROR,
(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
(errmsg("must be superuser to rotate log files with adminpack 1.0"),
/* translator: %s is a SQL function name */
/* translator: %s is a SQL function name */
errhint("Consider using %s, which is part of core, instead.",
"pg_logfile_rotate()"))));

View File

@@ -906,7 +906,7 @@ WaitForLockersMultiple(List *locktags, LOCKMODE lockmode, bool progress)
*/
if (progress)
{
PGPROC *holder = BackendIdGetProc(lockholders->backendId);
PGPROC *holder = BackendIdGetProc(lockholders->backendId);
pgstat_progress_update_param(PROGRESS_WAITFOR_CURRENT_PID,
holder->pid);
@@ -925,9 +925,10 @@ WaitForLockersMultiple(List *locktags, LOCKMODE lockmode, bool progress)
PROGRESS_WAITFOR_DONE,
PROGRESS_WAITFOR_CURRENT_PID
};
const int64 values[] = {
const int64 values[] = {
0, 0, 0
};
pgstat_progress_update_multi_param(3, index, values);
}

View File

@@ -91,7 +91,7 @@ static const int NSmgr = lengthof(smgrsw);
*/
static HTAB *SMgrRelationHash = NULL;
static dlist_head unowned_relns;
static dlist_head unowned_relns;
/* local function prototypes */
static void smgrshutdown(int code, Datum arg);
@@ -713,7 +713,7 @@ smgrimmedsync(SMgrRelation reln, ForkNumber forknum)
void
AtEOXact_SMgr(void)
{
dlist_mutable_iter iter;
dlist_mutable_iter iter;
/*
* Zap all unowned SMgrRelations. We rely on smgrclose() to remove each
@@ -721,8 +721,8 @@ AtEOXact_SMgr(void)
*/
dlist_foreach_modify(iter, &unowned_relns)
{
SMgrRelation rel = dlist_container(SMgrRelationData, node,
iter.cur);
SMgrRelation rel = dlist_container(SMgrRelationData, node,
iter.cur);
Assert(rel->smgr_owner == NULL);

View File

@@ -548,8 +548,8 @@ RegisterSyncRequest(const FileTag *ftag, SyncRequestType type,
for (;;)
{
/*
* Notify the checkpointer about it. If we fail to queue a message
* in retryOnError mode, we have to sleep and try again ... ugly, but
* Notify the checkpointer about it. If we fail to queue a message in
* retryOnError mode, we have to sleep and try again ... ugly, but
* hopefully won't happen often.
*
* XXX should we CHECK_FOR_INTERRUPTS in this loop? Escaping with an