git.postgresql.org Git - postgresql.git/commit

git projects / postgresql.git / commit
? search:
summary | shortlog | log | commit | commitdiff | tree
(parent: 85eda7e) | patch
Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock().
2015年9月20日 20:48:44 +0000 (16:48 -0400)
2015年9月20日 20:48:44 +0000 (16:48 -0400)
commit ba51774d87a2a0402628f7bd68295c0b2913cc25
Be more wary about partially-valid LOCALLOCK data in RemoveLocalLock().

RemoveLocalLock() must consider the possibility that LockAcquireExtended()
failed to palloc the initial space for a locallock's lockOwners array.
I had evidently meant to cope with this hazard when the code was originally
written (commit 1785acebf2ed14fd66955e2d9a55d77a025f418d), but missed that
the pfree needed to be protected with an if-test. Just to make sure things
are left in a clean state, reset numLockOwners as well.

Per low-memory testing by Andreas Seltenreich. Back-patch to all supported
branches.
src/backend/storage/lmgr/lock.c diff | blob | blame | history
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /