postgresql/contrib/pgstattuple
Robert Haas a892234f83 Change the format of the VM fork to add a second bit per page.
The new bit indicates whether every tuple on the page is already frozen.
It is cleared only when the all-visible bit is cleared, and it can be
set only when we vacuum a page and find that every tuple on that page is
both visible to every transaction and in no need of any future
vacuuming.

A future commit will use this new bit to optimize away full-table scans
that would otherwise be triggered by XID wraparound considerations.  A
page which is merely all-visible must still be scanned in that case, but
a page which is all-frozen need not be.  This commit does not attempt
that optimization, although that optimization is the goal here.  It
seems better to get the basic infrastructure in place first.

Per discussion, it's very desirable for pg_upgrade to automatically
migrate existing VM forks from the old format to the new format.  That,
too, will be handled in a follow-on patch.

Masahiko Sawada, reviewed by Kyotaro Horiguchi, Fujii Masao, Amit
Kapila, Simon Riggs, Andres Freund, and others, and substantially
revised by me.
2016-03-01 21:49:41 -05:00
..
expected Fix multiple bugs in contrib/pgstattuple's pgstatindex() function. 2016-02-18 15:40:35 -05:00
sql Fix multiple bugs in contrib/pgstattuple's pgstatindex() function. 2016-02-18 15:40:35 -05:00
.gitignore Add a regression test for pgstattuple. 2011-08-25 00:06:16 -04:00
Makefile Add pgstattuple_approx() to the pgstattuple extension. 2015-05-13 07:35:06 +02:00
pgstatapprox.c Change the format of the VM fork to add a second bit per page. 2016-03-01 21:49:41 -05:00
pgstatindex.c Fix multiple bugs in contrib/pgstattuple's pgstatindex() function. 2016-02-18 15:40:35 -05:00
pgstattuple--1.0--1.1.sql Add pgstatginindex() function to get the size of the GIN pending list. 2012-12-05 09:58:03 +02:00
pgstattuple--1.1--1.2.sql Fix pgstattuple functions to use regclass-type as the argument. 2013-07-19 03:50:20 +09:00
pgstattuple--1.2--1.3.sql Add pgstattuple_approx() to the pgstattuple extension. 2015-05-13 07:35:06 +02:00
pgstattuple--1.3.sql Add pgstattuple_approx() to the pgstattuple extension. 2015-05-13 07:35:06 +02:00
pgstattuple--unpackaged--1.0.sql Fix typos in some error messages thrown by extension scripts when fed to psql. 2014-08-25 18:30:37 +02:00
pgstattuple.c Restructure index access method API to hide most of it at the C level. 2016-01-17 19:36:59 -05:00
pgstattuple.control Add pgstattuple_approx() to the pgstattuple extension. 2015-05-13 07:35:06 +02:00