diff options
author | Andres Freund <andres@anarazel.de> | 2021-06-11 21:22:21 -0700 |
---|---|---|
committer | Andres Freund <andres@anarazel.de> | 2021-06-11 21:33:07 -0700 |
commit | d8e950d3ae7b33a2064a4fb39b7829334b0b47bc (patch) | |
tree | b00a49c23d553b9d3df6dd11c17bce250ffc4534 /src/backend/utils/adt/dbsize.c | |
parent | d120e66fac87f768ea2289d2d923d0ee4262ec0f (diff) | |
download | postgresql-d8e950d3ae7b33a2064a4fb39b7829334b0b47bc.tar.gz postgresql-d8e950d3ae7b33a2064a4fb39b7829334b0b47bc.zip |
Improve and cleanup ProcArrayAdd(), ProcArrayRemove().
941697c3c1a changed ProcArrayAdd()/Remove() substantially. As reported by
zhanyi, I missed that due to the introduction of the PGPROC->pgxactoff
ProcArrayRemove() does not need to search for the position in
procArray->pgprocnos anymore - that's pgxactoff. Remove the search loop.
The removal of the search loop reduces assertion coverage a bit - but we can
easily do better than before by adding assertions to other loops over
pgprocnos elements.
Also do a bit of cleanup, mostly by reducing line lengths by introducing local
helper variables and adding newlines.
Author: zhanyi <w@hidva.com>
Author: Andres Freund <andres@anarazel.de>
Discussion: https://postgr.es/m/tencent_5624AA3B116B3D1C31CA9744@qq.com
Diffstat (limited to 'src/backend/utils/adt/dbsize.c')
0 files changed, 0 insertions, 0 deletions