diff options
author | Amit Kapila | 2019-02-20 12:07:39 +0000 |
---|---|---|
committer | Amit Kapila | 2019-02-20 12:07:39 +0000 |
commit | 29d108cdecbe918452e70041d802cc515b2d56b8 (patch) | |
tree | ea7e939c2c2c7fe4d72fb6e2d247b861a44fd87f /contrib/pgstattuple/pgstatapprox.c | |
parent | 41531e42d34f4aca117d343b5e40f3f757dec5fe (diff) |
Doc: Update the documentation for FSM behavior for small tables.
In commit b0eaa4c51b, we have avoided the creation of FSM for small tables.
So the functions that use FSM to compute the free space can return zero for
such tables. This was previously also possible for the cases where the
vacuum has not been triggered to update FSM.
This commit updates the comments in code and documentation to reflect this
behavior.
Author: John Naylor
Reviewed-by: Amit Kapila
Discussion: https://postgr.es/m/CACPNZCtba-3m1q3A8gxA_vxg=T7gQf7gMbpR4Ciy5LntY-j+0Q@mail.gmail.com
Diffstat (limited to 'contrib/pgstattuple/pgstatapprox.c')
-rw-r--r-- | contrib/pgstattuple/pgstatapprox.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c index ff7c255a2de..d36758af9a6 100644 --- a/contrib/pgstattuple/pgstatapprox.c +++ b/contrib/pgstattuple/pgstatapprox.c @@ -89,6 +89,9 @@ 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)) { |