Revert "Avoid the creation of the free space map for small heap relations".
authorAmit Kapila <[email protected]>
Tue, 7 May 2019 04:00:24 +0000 (09:30 +0530)
committerAmit Kapila <[email protected]>
Tue, 7 May 2019 04:00:24 +0000 (09:30 +0530)
commit7db0cde6b58eef2ba0c70437324cbc7622230320
tree51c6e3fc7db7d2f9e140e30116d09f24042073e2
parentaf82f95abb23a56d18fd009ef9eca68ef803a041
Revert "Avoid the creation of the free space map for small heap relations".

This feature was using a process local map to track the first few blocks
in the relation.  The map was reset each time we get the block with enough
freespace.  It was discussed that it would be better to track this map on
a per-relation basis in relcache and then invalidate the same whenever
vacuum frees up some space in the page or when FSM is created.  The new
design would be better both in terms of API design and performance.

List of commits reverted, in reverse chronological order:

06c8a5090e  Improve code comments in b0eaa4c51b.
13e8643bfc  During pg_upgrade, conditionally skip transfer of FSMs.
6f918159a9  Add more tests for FSM.
9c32e4c350  Clear the local map when not used.
29d108cdec  Update the documentation for FSM behavior..
08ecdfe7e5  Make FSM test portable.
b0eaa4c51b  Avoid creation of the free space map for small heap relations.

Discussion: https://postgr.es/m/20190416180452[email protected]
23 files changed:
contrib/pageinspect/expected/page.out
contrib/pageinspect/sql/page.sql
contrib/pgstattuple/pgstatapprox.c
doc/src/sgml/pgfreespacemap.sgml
doc/src/sgml/pgstattuple.sgml
doc/src/sgml/ref/pgupgrade.sgml
doc/src/sgml/storage.sgml
src/backend/access/brin/brin.c
src/backend/access/brin/brin_pageops.c
src/backend/access/heap/hio.c
src/backend/access/heap/vacuumlazy.c
src/backend/access/transam/xact.c
src/backend/storage/freespace/README
src/backend/storage/freespace/freespace.c
src/backend/storage/freespace/indexfsm.c
src/bin/pg_upgrade/info.c
src/bin/pg_upgrade/pg_upgrade.h
src/bin/pg_upgrade/relfilenode.c
src/include/storage/freespace.h
src/test/regress/expected/fsm.out [deleted file]
src/test/regress/parallel_schedule
src/test/regress/serial_schedule
src/test/regress/sql/fsm.sql [deleted file]