summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/proc.c
diff options
context:
space:
mode:
authorTom Lane2017-06-21 19:35:54 +0000
committerTom Lane2017-06-21 19:35:54 +0000
commit382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch)
treef558251492f2c6f86e3566f7a82f9d00509122c2 /src/backend/storage/lmgr/proc.c
parentc7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff)
Phase 3 of pgindent updates.
Don't move parenthesized lines to the left, even if that means they flow past the right margin. By default, BSD indent lines up statement continuation lines that are within parentheses so that they start just to the right of the preceding left parenthesis. However, traditionally, if that resulted in the continuation line extending to the right of the desired right margin, then indent would push it left just far enough to not overrun the margin, if it could do so without making the continuation line start to the left of the current statement indent. That makes for a weird mix of indentations unless one has been completely rigid about never violating the 80-column limit. This behavior has been pretty universally panned by Postgres developers. Hence, disable it with indent's new -lpl switch, so that parenthesized lines are always lined up with the preceding left paren. This patch is much less interesting than the first round of indent changes, but also bulkier, so I thought it best to separate the effects. Discussion: https://postgr.es/m/[email protected] Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r--src/backend/storage/lmgr/proc.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index b76c170630a..bfa84992ea3 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -1299,8 +1299,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
appendStringInfo(&logbuf,
_("Process %d waits for %s on %s."),
MyProcPid,
- GetLockmodeName(lock->tag.locktag_lockmethodid,
- lockmode),
+ GetLockmodeName(lock->tag.locktag_lockmethodid,
+ lockmode),
locktagbuf.data);
/* release lock as quickly as possible */
@@ -1308,9 +1308,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
/* send the autovacuum worker Back to Old Kent Road */
ereport(DEBUG1,
- (errmsg("sending cancel to blocking autovacuum PID %d",
- pid),
- errdetail_log("%s", logbuf.data)));
+ (errmsg("sending cancel to blocking autovacuum PID %d",
+ pid),
+ errdetail_log("%s", logbuf.data)));
if (kill(pid, SIGINT) < 0)
{
@@ -1326,8 +1326,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
*/
if (errno != ESRCH)
ereport(WARNING,
- (errmsg("could not send signal to process %d: %m",
- pid)));
+ (errmsg("could not send signal to process %d: %m",
+ pid)));
}
pfree(logbuf.data);
@@ -1385,7 +1385,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
procLocks = &(lock->procLocks);
proclock = (PROCLOCK *) SHMQueueNext(procLocks, procLocks,
- offsetof(PROCLOCK, lockLink));
+ offsetof(PROCLOCK, lockLink));
while (proclock)
{
@@ -1421,7 +1421,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
}
proclock = (PROCLOCK *) SHMQueueNext(procLocks, &proclock->lockLink,
- offsetof(PROCLOCK, lockLink));
+ offsetof(PROCLOCK, lockLink));
}
LWLockRelease(partitionLock);
@@ -1431,7 +1431,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
(errmsg("process %d avoided deadlock for %s on %s by rearranging queue order after %ld.%03d ms",
MyProcPid, modename, buf.data, msecs, usecs),
(errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.",
- "Processes holding the lock: %s. Wait queue: %s.",
+ "Processes holding the lock: %s. Wait queue: %s.",
lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data))));
else if (deadlock_state == DS_HARD_DEADLOCK)
{
@@ -1446,7 +1446,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
(errmsg("process %d detected deadlock while waiting for %s on %s after %ld.%03d ms",
MyProcPid, modename, buf.data, msecs, usecs),
(errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.",
- "Processes holding the lock: %s. Wait queue: %s.",
+ "Processes holding the lock: %s. Wait queue: %s.",
lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data))));
}
@@ -1455,12 +1455,12 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
(errmsg("process %d still waiting for %s on %s after %ld.%03d ms",
MyProcPid, modename, buf.data, msecs, usecs),
(errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.",
- "Processes holding the lock: %s. Wait queue: %s.",
+ "Processes holding the lock: %s. Wait queue: %s.",
lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data))));
else if (myWaitStatus == STATUS_OK)
ereport(LOG,
- (errmsg("process %d acquired %s on %s after %ld.%03d ms",
- MyProcPid, modename, buf.data, msecs, usecs)));
+ (errmsg("process %d acquired %s on %s after %ld.%03d ms",
+ MyProcPid, modename, buf.data, msecs, usecs)));
else
{
Assert(myWaitStatus == STATUS_ERROR);
@@ -1476,9 +1476,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
if (deadlock_state != DS_HARD_DEADLOCK)
ereport(LOG,
(errmsg("process %d failed to acquire %s on %s after %ld.%03d ms",
- MyProcPid, modename, buf.data, msecs, usecs),
+ MyProcPid, modename, buf.data, msecs, usecs),
(errdetail_log_plural("Process holding the lock: %s. Wait queue: %s.",
- "Processes holding the lock: %s. Wait queue: %s.",
+ "Processes holding the lock: %s. Wait queue: %s.",
lockHoldersNum, lock_holders_sbuf.data, lock_waiters_sbuf.data))));
}