Add pgstattuple_approx() to the pgstattuple extension.
authorAndres Freund <andres@anarazel.de>
Wed, 13 May 2015 05:31:04 +0000 (07:31 +0200)
committerAndres Freund <andres@anarazel.de>
Wed, 13 May 2015 05:35:06 +0000 (07:35 +0200)
commit5850b20f58a594ac69f4f77b24cad94fc3bfd946
tree94c2b2bbc0ee7f7313400521ce2c8b768a911dfe
parentdcf5e319089e750d726a0e18a8c90b258c39362c
Add pgstattuple_approx() to the pgstattuple extension.

The new function allows to estimate bloat and other table level statics
in a faster, but approximate, way. It does so by using information from
the free space map for pages marked as all visible in the visibility
map. The rest of the table is actually read and free space/bloat is
measured accurately.  In many cases that allows to get bloat information
much quicker, causing less IO.

Author: Abhijit Menon-Sen
Reviewed-By: Andres Freund, Amit Kapila and Tomas Vondra
Discussion: 20140402214144.GA28681@kea.toroid.org
contrib/pgstattuple/Makefile
contrib/pgstattuple/pgstatapprox.c [new file with mode: 0644]
contrib/pgstattuple/pgstattuple--1.2--1.3.sql [new file with mode: 0644]
contrib/pgstattuple/pgstattuple--1.3.sql [moved from contrib/pgstattuple/pgstattuple--1.2.sql with 72% similarity]
contrib/pgstattuple/pgstattuple.control
doc/src/sgml/pgstattuple.sgml