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

Noah Misch <noah@leadboat.com>

Commit: 9d0826c595e2a376f6645eb575a9d81d5f5ececf
Author: Noah Misch <noah@leadboat.com>
Date: 2014-06-30T20:59:19Z
Releases: 9.5.0
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.

Files

PathChange+/−
contrib/pgstattuple/pgstattuple.c modified +5 −8