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

Noah Misch <noah@leadboat.com>

Commit: f14e4085215b6d71a54f10932f680ae60d8619b3
Author: Noah Misch <noah@leadboat.com>
Date: 2014-06-30T21:00:22Z
Releases: 9.3.5
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