Fix VM buffer pin management in heap_lock_updated_tuple_rec().

Sloppy coding in this function could lead to leaking a VM buffer pin,
or to attempting to free the same pin twice.  Repair.  While at it,
reduce the code's tendency to free and reacquire the same page pin.

Back-patch to 9.6; before that, this routine did not concern itself
with VM pages.

Amit Kapila and Tom Lane




Modified Files
src/backend/access/heap/heapam.c | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)

Reply via email to