summaryrefslogtreecommitdiff
path: root/contrib/pgstattuple/pgstatapprox.c
diff options
context:
space:
mode:
authorAmit Kapila2019-05-07 04:00:24 +0000
committerAmit Kapila2019-05-07 04:00:24 +0000
commit7db0cde6b58eef2ba0c70437324cbc7622230320 (patch)
tree51c6e3fc7db7d2f9e140e30116d09f24042073e2 /contrib/pgstattuple/pgstatapprox.c
parentaf82f95abb23a56d18fd009ef9eca68ef803a041 (diff)
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.3pm6uegx54iitbt5@alap3.anarazel.de
Diffstat (limited to 'contrib/pgstattuple/pgstatapprox.c')
-rw-r--r--contrib/pgstattuple/pgstatapprox.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index ed62aef7669..636c8d40aca 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -90,9 +90,6 @@ statapprox_heap(Relation rel, output_type *stat)
/*
* If the page has only visible tuples, then we can find out the free
* space from the FSM and move on.
- *
- * Note: If a relation has no FSM, GetRecordedFreeSpace() will report
- * zero free space. This is fine for the purposes of approximation.
*/
if (VM_ALL_VISIBLE(rel, blkno, &vmbuffer))
{