From f6ddb0cdddfb2bb0c3195edcbb60d3ca5f679a90 Mon Sep 17 00:00:00 2001
From: John Naylor <jcnaylor@gmail.com>
Date: Tue, 5 Feb 2019 10:42:18 +0100
Subject: [PATCH v1 2/2] Add note that relations with no FSM will report no
 free space.

---
 contrib/pgstattuple/pgstatapprox.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/pgstattuple/pgstatapprox.c b/contrib/pgstattuple/pgstatapprox.c
index ff7c255a2d..23ccaaaca6 100644
--- a/contrib/pgstattuple/pgstatapprox.c
+++ b/contrib/pgstattuple/pgstatapprox.c
@@ -89,6 +89,8 @@ 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))
 		{
-- 
2.17.1

