pgsql: Fix VM buffer pin management in heap_lock_updated_tuple_rec(). - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Fix VM buffer pin management in heap_lock_updated_tuple_rec().
Date
Msg-id E1ertMK-0001qA-39@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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

Discussion: https://postgr.es/m/CAA4eK1KJKwhc=isgTQHjM76CAdVswzNeAuZkh_cx-6QgGkSEgA@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/0b1d1a038babff4aadf0862c28e7b667f1b12a30

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


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Fix pgbench TAP test to work in VPATH builds.
Next
From: Peter Eisentraut
Date:
Subject: pgsql: Add PG_TEST_EXTRA to control optional test suites