mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Pre-beta mechanical code beautification.
Run pgindent, pgperltidy, and reformat-dat-files. This set of diffs is a bit larger than typical. We've updated to pg_bsd_indent 2.1.2, which properly indents variable declarations that have multi-line initialization expressions (the continuation lines are now indented one tab stop). We've also updated to perltidy version 20230309 and changed some of its settings, which reduces its desire to add whitespace to lines to make assignments etc. line up. Going forward, that should make for fewer random-seeming changes to existing code. Discussion: https://postgr.es/m/20230428092545.qfb3y5wcu4cm75ur@alvherre.pgsql
This commit is contained in:
@@ -101,7 +101,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));
|
||||
@@ -331,7 +331,7 @@ InitProcess(void)
|
||||
|
||||
if (!dlist_is_empty(procgloballist))
|
||||
{
|
||||
MyProc = (PGPROC*) dlist_pop_head_node(procgloballist);
|
||||
MyProc = (PGPROC *) dlist_pop_head_node(procgloballist);
|
||||
SpinLockRelease(ProcStructLock);
|
||||
}
|
||||
else
|
||||
@@ -1009,7 +1009,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
|
||||
uint32 hashcode = locallock->hashcode;
|
||||
LWLock *partitionLock = LockHashPartitionLock(hashcode);
|
||||
dclist_head *waitQueue = &lock->waitProcs;
|
||||
PGPROC *insert_before = NULL;
|
||||
PGPROC *insert_before = NULL;
|
||||
LOCKMASK myHeldLocks = MyProc->heldLocks;
|
||||
TimestampTz standbyWaitStart = 0;
|
||||
bool early_deadlock = false;
|
||||
@@ -1244,7 +1244,7 @@ ProcSleep(LOCALLOCK *locallock, LockMethod lockMethodTable)
|
||||
if (InHotStandby)
|
||||
{
|
||||
bool maybe_log_conflict =
|
||||
(standbyWaitStart != 0 && !logged_recovery_conflict);
|
||||
(standbyWaitStart != 0 && !logged_recovery_conflict);
|
||||
|
||||
/* Set a timer and wait for that or for the lock to be granted */
|
||||
ResolveRecoveryConflictWithLock(locallock->tag.lock,
|
||||
|
||||
Reference in New Issue
Block a user