summaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr/proc.c
diff options
context:
space:
mode:
authorTom Lane2021-05-12 17:14:10 +0000
committerTom Lane2021-05-12 17:14:10 +0000
commitdef5b065ff22a16a80084587613599fe15627213 (patch)
tree13f424449b7fb90c85659071b6adf4e27ae6d272 /src/backend/storage/lmgr/proc.c
parente6ccd1ce1644d1b40b7981f8bc172394de524f99 (diff)
Initial pgindent and pgperltidy run for v14.
Also "make reformat-dat-files". The only change worthy of note is that pgindent messed up the formatting of launcher.c's struct LogicalRepWorkerId, which led me to notice that that struct wasn't used at all anymore, so I just took it out.
Diffstat (limited to 'src/backend/storage/lmgr/proc.c')
-rw-r--r--src/backend/storage/lmgr/proc.c31
1 files changed, 16 insertions, 15 deletions
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 692f21ef6a8..2575ea1ca0d 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -103,7 +103,7 @@ ProcGlobalShmemSize(void)
{
Size size = 0;
Size TotalProcs =
- add_size(MaxBackends, add_size(NUM_AUXILIARY_PROCS, max_prepared_xacts));
+ add_size(MaxBackends, add_size(NUM_AUXILIARY_PROCS, max_prepared_xacts));
/* ProcGlobal */
size = add_size(size, sizeof(PROC_HDR));
@@ -1245,8 +1245,8 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
/*
* Set timer so we can wake up after awhile and check for a deadlock. If a
* deadlock is detected, the handler sets MyProc->waitStatus =
- * PROC_WAIT_STATUS_ERROR, allowing us to know that we must report failure rather
- * than success.
+ * PROC_WAIT_STATUS_ERROR, allowing us to know that we must report failure
+ * rather than success.
*
* By delaying the check until we've waited for a bit, we can avoid
* running the rather expensive deadlock-check code in most cases.
@@ -1371,9 +1371,9 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
}
/*
- * waitStatus could change from PROC_WAIT_STATUS_WAITING to something else
- * asynchronously. Read it just once per loop to prevent surprising
- * behavior (such as missing log messages).
+ * waitStatus could change from PROC_WAIT_STATUS_WAITING to something
+ * else asynchronously. Read it just once per loop to prevent
+ * surprising behavior (such as missing log messages).
*/
myWaitStatus = *((volatile ProcWaitStatus *) &MyProc->waitStatus);
@@ -1429,7 +1429,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
ereport(DEBUG1,
(errmsg_internal("sending cancel to blocking autovacuum PID %d",
- pid),
+ pid),
errdetail_log("%s", logbuf.data)));
pfree(locktagbuf.data);
@@ -1587,11 +1587,12 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
/*
* Currently, the deadlock checker always kicks its own
- * process, which means that we'll only see PROC_WAIT_STATUS_ERROR when
- * deadlock_state == DS_HARD_DEADLOCK, and there's no need to
- * print redundant messages. But for completeness and
- * future-proofing, print a message if it looks like someone
- * else kicked us off the lock.
+ * process, which means that we'll only see
+ * PROC_WAIT_STATUS_ERROR when deadlock_state ==
+ * DS_HARD_DEADLOCK, and there's no need to print redundant
+ * messages. But for completeness and future-proofing, print
+ * a message if it looks like someone else kicked us off the
+ * lock.
*/
if (deadlock_state != DS_HARD_DEADLOCK)
ereport(LOG,
@@ -1830,9 +1831,9 @@ CheckDeadLock(void)
* preserve the flexibility to kill some other transaction than the
* one detecting the deadlock.)
*
- * RemoveFromWaitQueue sets MyProc->waitStatus to PROC_WAIT_STATUS_ERROR, so
- * ProcSleep will report an error after we return from the signal
- * handler.
+ * RemoveFromWaitQueue sets MyProc->waitStatus to
+ * PROC_WAIT_STATUS_ERROR, so ProcSleep will report an error after we
+ * return from the signal handler.
*/
Assert(MyProc->waitLock != NULL);
RemoveFromWaitQueue(MyProc, LockTagHashCode(&(MyProc->waitLock->tag)));