Don't prematurely free the BufferAccessStrategy in pgstat_heap().
authorNoah Misch <noah@leadboat.com>
Mon, 30 Jun 2014 20:59:19 +0000 (16:59 -0400)
committerNoah Misch <noah@leadboat.com>
Mon, 30 Jun 2014 20:59:19 +0000 (16:59 -0400)
commit9d0826c595e2a376f6645eb575a9d81d5f5ececf
tree938c6191630a1d94fa7f113a6b4070fc6e40fb52
parent6647f59fd256927aaf9e35929b5c284d10d18839
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.
contrib/pgstattuple/pgstattuple.c