pgsql: Don't prematurely free the BufferAccessStrategy in pgstat_heap()

From: Noah Misch <noah(at)leadboat(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Don't prematurely free the BufferAccessStrategy in pgstat_heap()
Date: 2014-06-30 21:06:14
Message-ID: E1X1imE-0006nE-MV@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Don't prematurely free the BufferAccessStrategy in pgstat_heap().

This function continued to use it after heap_endscan() freed it. In
passing, don't explicit create a strategy here. Instead, use the one
created by heap_beginscan_strat(), if any. Back-patch to 9.2, where use
of a BufferAccessStrategy here was introduced.

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/37a4d3d70617f574b9a3dd5af079430b24817333

Modified Files
--------------
contrib/pgstattuple/pgstattuple.c | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-06-30 23:56:41 pgsql: pg_upgrade: update C comments about pg_dumpall
Previous Message Andres Freund 2014-06-30 15:23:00 Re: pgsql: Check interrupts during logical decoding more frequently.