aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils/adt/numeric.c
diff options
context:
space:
mode:
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-02-07 09:38:25 +0200
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>2012-02-07 10:11:54 +0200
commit15ad6f1510f8979a39e4c39078c742b5fdb121ce (patch)
tree8dbe561e53e047c8e279aa74e8a2e009cf67efcd /src/backend/utils/adt/numeric.c
parent442231d7f71764b8c628044e7ce2225f9aa43b67 (diff)
downloadpostgresql-15ad6f1510f8979a39e4c39078c742b5fdb121ce.tar.gz
postgresql-15ad6f1510f8979a39e4c39078c742b5fdb121ce.zip
When building with LWLOCK_STATS, initialize the stats in LWLockWaitUntilFree.
If LWLockWaitUntilFree was called before the first LWLockAcquire call, you would either crash because of access to uninitialized array or account the acquisition incorrectly. LWLockConditionalAcquire doesn't have this problem because it doesn't update the lwlock stats. In practice, this never happens because there is no codepath where you would call LWLockWaitUntilfree before LWLockAcquire after a new process is launched. But that's just accidental, there's no guarantee that that's always going to be true in the future. Spotted by Jeff Janes.
Diffstat (limited to 'src/backend/utils/adt/numeric.c')
0 files changed, 0 insertions, 0 deletions