diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 15:35:54 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-06-21 15:35:54 -0400 |
commit | 382ceffdf7f620d8f2d50e451b4167d291ae2348 (patch) | |
tree | f558251492f2c6f86e3566f7a82f9d00509122c2 /src/backend/storage/ipc | |
parent | c7b8998ebbf310a156aa38022555a24d98fdbfb4 (diff) | |
download | postgresql-382ceffdf7f620d8f2d50e451b4167d291ae2348.tar.gz postgresql-382ceffdf7f620d8f2d50e451b4167d291ae2348.zip |
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/E1dAmxK-0006EE-1r@gemulon.postgresql.org
Discussion: https://postgr.es/m/30527.1495162840@sss.pgh.pa.us
Diffstat (limited to 'src/backend/storage/ipc')
-rw-r--r-- | src/backend/storage/ipc/dsm.c | 4 | ||||
-rw-r--r-- | src/backend/storage/ipc/dsm_impl.c | 52 | ||||
-rw-r--r-- | src/backend/storage/ipc/ipc.c | 6 | ||||
-rw-r--r-- | src/backend/storage/ipc/latch.c | 2 | ||||
-rw-r--r-- | src/backend/storage/ipc/procarray.c | 6 | ||||
-rw-r--r-- | src/backend/storage/ipc/shm_toc.c | 4 | ||||
-rw-r--r-- | src/backend/storage/ipc/shmem.c | 10 | ||||
-rw-r--r-- | src/backend/storage/ipc/sinval.c | 2 | ||||
-rw-r--r-- | src/backend/storage/ipc/standby.c | 10 |
9 files changed, 48 insertions, 48 deletions
diff --git a/src/backend/storage/ipc/dsm.c b/src/backend/storage/ipc/dsm.c index 008cd9145c0..36904d2676f 100644 --- a/src/backend/storage/ipc/dsm.c +++ b/src/backend/storage/ipc/dsm.c @@ -429,7 +429,7 @@ dsm_backend_startup(void) &dsm_control_mapped_size, WARNING); ereport(FATAL, (errcode(ERRCODE_INTERNAL_ERROR), - errmsg("dynamic shared memory control segment is not valid"))); + errmsg("dynamic shared memory control segment is not valid"))); } } #endif @@ -935,7 +935,7 @@ dsm_unpin_segment(dsm_handle handle) * dsm_impl_unpin_segment. */ dsm_impl_unpin_segment(handle, - &dsm_control->item[control_slot].impl_private_pm_handle); + &dsm_control->item[control_slot].impl_private_pm_handle); /* Note that 1 means no references (0 means unused slot). */ if (--dsm_control->item[control_slot].refcnt == 1) diff --git a/src/backend/storage/ipc/dsm_impl.c b/src/backend/storage/ipc/dsm_impl.c index d101c717d36..1500465d31c 100644 --- a/src/backend/storage/ipc/dsm_impl.c +++ b/src/backend/storage/ipc/dsm_impl.c @@ -258,8 +258,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -268,8 +268,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -358,8 +358,8 @@ dsm_impl_posix(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -530,8 +530,8 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -540,8 +540,8 @@ dsm_impl_sysv(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -645,8 +645,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(GetLastError()); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } if (*impl_private != NULL @@ -655,8 +655,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(GetLastError()); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } @@ -711,8 +711,8 @@ dsm_impl_windows(dsm_op op, dsm_handle handle, Size request_size, _dosmaperr(errcode); ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not create shared memory segment \"%s\": %m", - name))); + errmsg("could not create shared memory segment \"%s\": %m", + name))); return false; } } @@ -816,8 +816,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -826,8 +826,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, { ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not remove shared memory segment \"%s\": %m", - name))); + errmsg("could not remove shared memory segment \"%s\": %m", + name))); return false; } return true; @@ -960,8 +960,8 @@ dsm_impl_mmap(dsm_op op, dsm_handle handle, Size request_size, ereport(elevel, (errcode_for_dynamic_shared_memory(), - errmsg("could not unmap shared memory segment \"%s\": %m", - name))); + errmsg("could not unmap shared memory segment \"%s\": %m", + name))); return false; } *mapped_address = NULL; @@ -1026,8 +1026,8 @@ dsm_impl_pin_segment(dsm_handle handle, void *impl_private, _dosmaperr(GetLastError()); ereport(ERROR, (errcode_for_dynamic_shared_memory(), - errmsg("could not duplicate handle for \"%s\": %m", - name))); + errmsg("could not duplicate handle for \"%s\": %m", + name))); } /* @@ -1074,8 +1074,8 @@ dsm_impl_unpin_segment(dsm_handle handle, void **impl_private) _dosmaperr(GetLastError()); ereport(ERROR, (errcode_for_dynamic_shared_memory(), - errmsg("could not duplicate handle for \"%s\": %m", - name))); + errmsg("could not duplicate handle for \"%s\": %m", + name))); } *impl_private = NULL; diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index ffd91f5b0a6..90dee4f51a5 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -198,7 +198,7 @@ proc_exit_prepare(int code) */ while (--on_proc_exit_index >= 0) (*on_proc_exit_list[on_proc_exit_index].function) (code, - on_proc_exit_list[on_proc_exit_index].arg); + on_proc_exit_list[on_proc_exit_index].arg); on_proc_exit_index = 0; } @@ -226,7 +226,7 @@ shmem_exit(int code) code, before_shmem_exit_index); while (--before_shmem_exit_index >= 0) (*before_shmem_exit_list[before_shmem_exit_index].function) (code, - before_shmem_exit_list[before_shmem_exit_index].arg); + before_shmem_exit_list[before_shmem_exit_index].arg); before_shmem_exit_index = 0; /* @@ -259,7 +259,7 @@ shmem_exit(int code) code, on_shmem_exit_index); while (--on_shmem_exit_index >= 0) (*on_shmem_exit_list[on_shmem_exit_index].function) (code, - on_shmem_exit_list[on_shmem_exit_index].arg); + on_shmem_exit_list[on_shmem_exit_index].arg); on_shmem_exit_index = 0; } diff --git a/src/backend/storage/ipc/latch.c b/src/backend/storage/ipc/latch.c index 29eb4ea54f6..07b1364de8f 100644 --- a/src/backend/storage/ipc/latch.c +++ b/src/backend/storage/ipc/latch.c @@ -1214,7 +1214,7 @@ WaitEventSetWaitBlock(WaitEventSet *set, int cur_timeout, } } else if (cur_event->events == WL_POSTMASTER_DEATH && - (cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL))) + (cur_pollfd->revents & (POLLIN | POLLHUP | POLLERR | POLLNVAL))) { /* * We expect an POLLHUP when the remote end is closed, but because diff --git a/src/backend/storage/ipc/procarray.c b/src/backend/storage/ipc/procarray.c index 2d6ae23eec5..6eb7c72ec32 100644 --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarray.c @@ -732,8 +732,8 @@ ProcArrayApplyRecoveryInfo(RunningTransactions running) } else elog(trace_recovery(DEBUG1), - "recovery snapshot waiting for non-overflowed snapshot or " - "until oldest active xid on standby is at least %u (now %u)", + "recovery snapshot waiting for non-overflowed snapshot or " + "until oldest active xid on standby is at least %u (now %u)", standbySnapshotPendingXmin, running->oldestRunningXid); return; @@ -3243,7 +3243,7 @@ RecordKnownAssignedTransactionIds(TransactionId xid) */ void ExpireTreeKnownAssignedTransactionIds(TransactionId xid, int nsubxids, - TransactionId *subxids, TransactionId max_xid) + TransactionId *subxids, TransactionId max_xid) { Assert(standbyState >= STANDBY_INITIALIZED); diff --git a/src/backend/storage/ipc/shm_toc.c b/src/backend/storage/ipc/shm_toc.c index a532f4fa5cf..9f259441f01 100644 --- a/src/backend/storage/ipc/shm_toc.c +++ b/src/backend/storage/ipc/shm_toc.c @@ -253,6 +253,6 @@ Size shm_toc_estimate(shm_toc_estimator *e) { return add_size(offsetof(shm_toc, toc_entry), - add_size(mul_size(e->number_of_keys, sizeof(shm_toc_entry)), - e->space_for_chunks)); + add_size(mul_size(e->number_of_keys, sizeof(shm_toc_entry)), + e->space_for_chunks)); } diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index e18d4c7e1c0..81c291f6e37 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -418,8 +418,8 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) LWLockRelease(ShmemIndexLock); ereport(ERROR, (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("could not create ShmemIndex entry for data structure \"%s\"", - name))); + errmsg("could not create ShmemIndex entry for data structure \"%s\"", + name))); } if (*foundPtr) @@ -433,9 +433,9 @@ ShmemInitStruct(const char *name, Size size, bool *foundPtr) { LWLockRelease(ShmemIndexLock); ereport(ERROR, - (errmsg("ShmemIndex entry size is wrong for data structure" - " \"%s\": expected %zu, actual %zu", - name, size, result->size))); + (errmsg("ShmemIndex entry size is wrong for data structure" + " \"%s\": expected %zu, actual %zu", + name, size, result->size))); } structPtr = result->location; } diff --git a/src/backend/storage/ipc/sinval.c b/src/backend/storage/ipc/sinval.c index 13f21e0d999..b9a73e92478 100644 --- a/src/backend/storage/ipc/sinval.c +++ b/src/backend/storage/ipc/sinval.c @@ -69,7 +69,7 @@ SendSharedInvalidMessages(const SharedInvalidationMessage *msgs, int n) */ void ReceiveSharedInvalidMessages( - void (*invalFunction) (SharedInvalidationMessage *msg), + void (*invalFunction) (SharedInvalidationMessage *msg), void (*resetFunction) (void)) { #define MAXINVALMSGS 32 diff --git a/src/backend/storage/ipc/standby.c b/src/backend/storage/ipc/standby.c index 8e57f933cab..0343cc6bdfc 100644 --- a/src/backend/storage/ipc/standby.c +++ b/src/backend/storage/ipc/standby.c @@ -284,7 +284,7 @@ ResolveRecoveryConflictWithSnapshot(TransactionId latestRemovedXid, RelFileNode node.dbNode); ResolveRecoveryConflictWithVirtualXIDs(backends, - PROCSIG_RECOVERY_CONFLICT_SNAPSHOT); + PROCSIG_RECOVERY_CONFLICT_SNAPSHOT); } void @@ -312,7 +312,7 @@ ResolveRecoveryConflictWithTablespace(Oid tsid) temp_file_users = GetConflictingVirtualXIDs(InvalidTransactionId, InvalidOid); ResolveRecoveryConflictWithVirtualXIDs(temp_file_users, - PROCSIG_RECOVERY_CONFLICT_TABLESPACE); + PROCSIG_RECOVERY_CONFLICT_TABLESPACE); } void @@ -376,7 +376,7 @@ ResolveRecoveryConflictWithLock(LOCKTAG locktag) backends = GetLockConflicts(&locktag, AccessExclusiveLock); ResolveRecoveryConflictWithVirtualXIDs(backends, - PROCSIG_RECOVERY_CONFLICT_LOCK); + PROCSIG_RECOVERY_CONFLICT_LOCK); } else { @@ -529,7 +529,7 @@ CheckRecoveryConflictDeadlock(void) ereport(ERROR, (errcode(ERRCODE_T_R_DEADLOCK_DETECTED), errmsg("canceling statement due to conflict with recovery"), - errdetail("User transaction caused buffer deadlock with recovery."))); + errdetail("User transaction caused buffer deadlock with recovery."))); } @@ -986,7 +986,7 @@ LogCurrentRunningXacts(RunningTransactions CurrRunningXacts) /* array of TransactionIds */ if (xlrec.xcnt > 0) XLogRegisterData((char *) CurrRunningXacts->xids, - (xlrec.xcnt + xlrec.subxcnt) * sizeof(TransactionId)); + (xlrec.xcnt + xlrec.subxcnt) * sizeof(TransactionId)); recptr = XLogInsert(RM_STANDBY_ID, XLOG_RUNNING_XACTS); |