commit c0a08cfadc472dbf674304ab5de94bd0946ca473
Author: Alexander Korotkov <a.korotkov@postgrespro.ru>
Date:   Thu Apr 19 00:44:44 2018 +0300

    Fix datatype for number of heap tuples during last cleanup
    
    It appears that new fields introduced in 857f9c36 have inconsistent datatypes:
    BTMetaPageData.btm_last_cleanup_num_heap_tuples is of float4 type,
    while xl_btree_metadata.last_cleanup_num_heap_tuples is of double type.
    IndexVacuumInfo.num_heap_tuples, which is a source of values for
    both former fields is of double type.  So, make both those fields in
    BTMetaPageData and xl_btree_metadata use float8 type in order to match the
    precision of the source.  That shouldn't be double type, because we always
    use types with explicit width in WAL.

diff --git a/src/include/access/nbtree.h b/src/include/access/nbtree.h
index 36619b220f..342b853b4e 100644
--- a/src/include/access/nbtree.h
+++ b/src/include/access/nbtree.h
@@ -105,7 +105,7 @@ typedef struct BTMetaPageData
 	/* following fields are available since page version 3 */
 	TransactionId btm_oldest_btpo_xact;	/* oldest btpo_xact among of
 										 * deleted pages */
-	float4		btm_last_cleanup_num_heap_tuples; /* number of heap tuples
+	float8		btm_last_cleanup_num_heap_tuples; /* number of heap tuples
 												   * during last cleanup */
 } BTMetaPageData;
 
diff --git a/src/include/access/nbtxlog.h b/src/include/access/nbtxlog.h
index c55b618ff7..819373031c 100644
--- a/src/include/access/nbtxlog.h
+++ b/src/include/access/nbtxlog.h
@@ -52,7 +52,7 @@ typedef struct xl_btree_metadata
 	BlockNumber fastroot;
 	uint32		fastlevel;
 	TransactionId oldest_btpo_xact;
-	double		last_cleanup_num_heap_tuples;
+	float8		last_cleanup_num_heap_tuples;
 } xl_btree_metadata;
 
 /*
