aboutsummaryrefslogtreecommitdiff
path: root/src/backend/storage/lmgr
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/storage/lmgr')
-rw-r--r--src/backend/storage/lmgr/lock.c34
-rw-r--r--src/backend/storage/lmgr/predicate.c4
-rw-r--r--src/backend/storage/lmgr/proc.c26
-rw-r--r--src/backend/storage/lmgr/spin.c2
4 files changed, 33 insertions, 33 deletions
diff --git a/src/backend/storage/lmgr/lock.c b/src/backend/storage/lmgr/lock.c
index f73c4ef5a56..8cd871f4b40 100644
--- a/src/backend/storage/lmgr/lock.c
+++ b/src/backend/storage/lmgr/lock.c
@@ -1210,7 +1210,7 @@ SetupLockInTable(LockMethod lockMethodTable, PGPROC *proc,
static void
RemoveLocalLock(LOCALLOCK *locallock)
{
- int i;
+ int i;
for (i = locallock->numLockOwners - 1; i >= 0; i--)
{
@@ -1988,7 +1988,7 @@ LockReleaseAll(LOCKMETHODID lockmethodid, bool allLocks)
LOCALLOCKOWNER *lockOwners = locallock->lockOwners;
/* If session lock is above array position 0, move it down to 0 */
- for (i = 0; i < locallock->numLockOwners ; i++)
+ for (i = 0; i < locallock->numLockOwners; i++)
{
if (lockOwners[i].owner == NULL)
lockOwners[0] = lockOwners[i];
@@ -2214,7 +2214,7 @@ LockReleaseCurrentOwner(LOCALLOCK **locallocks, int nlocks)
}
else
{
- int i;
+ int i;
for (i = nlocks - 1; i >= 0; i--)
ReleaseLockIfHeld(locallocks[i], false);
@@ -2313,7 +2313,7 @@ LockReassignCurrentOwner(LOCALLOCK **locallocks, int nlocks)
}
else
{
- int i;
+ int i;
for (i = nlocks - 1; i >= 0; i--)
LockReassignOwner(locallocks[i], parent);
@@ -2333,8 +2333,8 @@ LockReassignOwner(LOCALLOCK *locallock, ResourceOwner parent)
int ip = -1;
/*
- * Scan to see if there are any locks belonging to current owner or
- * its parent
+ * Scan to see if there are any locks belonging to current owner or its
+ * parent
*/
lockOwners = locallock->lockOwners;
for (i = locallock->numLockOwners - 1; i >= 0; i--)
@@ -2346,7 +2346,7 @@ LockReassignOwner(LOCALLOCK *locallock, ResourceOwner parent)
}
if (ic < 0)
- return; /* no current locks */
+ return; /* no current locks */
if (ip < 0)
{
@@ -2690,9 +2690,9 @@ GetLockConflicts(const LOCKTAG *locktag, LOCKMODE lockmode)
LWLockAcquire(proc->backendLock, LW_SHARED);
/*
- * If the target backend isn't referencing the same database as the
- * lock, then we needn't examine the individual relation IDs at
- * all; none of them can be relevant.
+ * If the target backend isn't referencing the same database as
+ * the lock, then we needn't examine the individual relation IDs
+ * at all; none of them can be relevant.
*
* See FastPathTransferLocks() for discussion of why we do this
* test after acquiring the lock.
@@ -3158,15 +3158,15 @@ PostPrepare_Locks(TransactionId xid)
/*
* We cannot simply modify proclock->tag.myProc to reassign
* ownership of the lock, because that's part of the hash key and
- * the proclock would then be in the wrong hash chain. Instead
+ * the proclock would then be in the wrong hash chain. Instead
* use hash_update_hash_key. (We used to create a new hash entry,
* but that risks out-of-memory failure if other processes are
- * busy making proclocks too.) We must unlink the proclock from
+ * busy making proclocks too.) We must unlink the proclock from
* our procLink chain and put it into the new proc's chain, too.
*
* Note: the updated proclock hash key will still belong to the
- * same hash partition, cf proclock_hash(). So the partition
- * lock we already hold is sufficient for this.
+ * same hash partition, cf proclock_hash(). So the partition lock
+ * we already hold is sufficient for this.
*/
SHMQueueDelete(&proclock->procLink);
@@ -3177,9 +3177,9 @@ PostPrepare_Locks(TransactionId xid)
proclocktag.myProc = newproc;
/*
- * Update the proclock. We should not find any existing entry
- * for the same hash key, since there can be only one entry for
- * any given lock with my own proc.
+ * Update the proclock. We should not find any existing entry for
+ * the same hash key, since there can be only one entry for any
+ * given lock with my own proc.
*/
if (!hash_update_hash_key(LockMethodProcLockHash,
(void *) proclock,
diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c
index 6029cfb78e3..b012df1c5d9 100644
--- a/src/backend/storage/lmgr/predicate.c
+++ b/src/backend/storage/lmgr/predicate.c
@@ -1575,8 +1575,8 @@ GetSerializableTransactionSnapshot(Snapshot snapshot)
/*
* Can't use serializable mode while recovery is still active, as it is,
- * for example, on a hot standby. We could get here despite the check
- * in check_XactIsoLevel() if default_transaction_isolation is set to
+ * for example, on a hot standby. We could get here despite the check in
+ * check_XactIsoLevel() if default_transaction_isolation is set to
* serializable, so phrase the hint accordingly.
*/
if (RecoveryInProgress())
diff --git a/src/backend/storage/lmgr/proc.c b/src/backend/storage/lmgr/proc.c
index 5809a797986..6d72a637f74 100644
--- a/src/backend/storage/lmgr/proc.c
+++ b/src/backend/storage/lmgr/proc.c
@@ -186,8 +186,8 @@ InitProcGlobal(void)
* five separate consumers: (1) normal backends, (2) autovacuum workers
* and the autovacuum launcher, (3) background workers, (4) auxiliary
* processes, and (5) prepared transactions. Each PGPROC structure is
- * dedicated to exactly one of these purposes, and they do not move between
- * groups.
+ * dedicated to exactly one of these purposes, and they do not move
+ * between groups.
*/
procs = (PGPROC *) ShmemAlloc(TotalProcs * sizeof(PGPROC));
ProcGlobal->allProcs = procs;
@@ -291,7 +291,7 @@ InitProcess(void)
elog(ERROR, "you already exist");
/*
- * Initialize process-local latch support. This could fail if the kernel
+ * Initialize process-local latch support. This could fail if the kernel
* is low on resources, and if so we want to exit cleanly before acquiring
* any shared-memory resources.
*/
@@ -476,7 +476,7 @@ InitAuxiliaryProcess(void)
elog(ERROR, "you already exist");
/*
- * Initialize process-local latch support. This could fail if the kernel
+ * Initialize process-local latch support. This could fail if the kernel
* is low on resources, and if so we want to exit cleanly before acquiring
* any shared-memory resources.
*/
@@ -1153,25 +1153,25 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
{
int pid = autovac->pid;
StringInfoData locktagbuf;
- StringInfoData logbuf; /* errdetail for server log */
+ StringInfoData logbuf; /* errdetail for server log */
initStringInfo(&locktagbuf);
initStringInfo(&logbuf);
DescribeLockTag(&locktagbuf, &lock->tag);
appendStringInfo(&logbuf,
- _("Process %d waits for %s on %s."),
- MyProcPid,
- GetLockmodeName(lock->tag.locktag_lockmethodid,
- lockmode),
- locktagbuf.data);
+ _("Process %d waits for %s on %s."),
+ MyProcPid,
+ GetLockmodeName(lock->tag.locktag_lockmethodid,
+ lockmode),
+ locktagbuf.data);
/* release lock as quickly as possible */
LWLockRelease(ProcArrayLock);
ereport(LOG,
- (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)));
pfree(logbuf.data);
pfree(locktagbuf.data);
diff --git a/src/backend/storage/lmgr/spin.c b/src/backend/storage/lmgr/spin.c
index 3d7a8f36a9c..5503925788e 100644
--- a/src/backend/storage/lmgr/spin.c
+++ b/src/backend/storage/lmgr/spin.c
@@ -51,7 +51,7 @@ SpinlockSemas(void)
int
SpinlockSemas(void)
{
- int nsemas;
+ int nsemas;
/*
* It would be cleaner to distribute this logic into the affected modules,