pgsql: Fix VM buffer pin management in heap_lock_updated_tuple_rec().

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix VM buffer pin management in heap_lock_updated_tuple_rec().
Date: 2018-03-02 22:41:00
Message-ID: E1ertMK-0001qC-37@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/76ec45756644e5d46301ee292f8f951f9f835fae

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

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2018-03-03 00:45:13 Re: [COMMITTERS] pgsql: Add much-more-extensive TAP tests for pgbench.
Previous Message Tom Lane 2018-03-02 19:48:32 pgsql: Fix pgbench TAP test to work in VPATH builds.