From 54954a4afd1ec8f7e2298a31cce22b8f3db2c460 Mon Sep 17 00:00:00 2001
From: Robert Haas <rhaas@postgresql.org>
Date: Fri, 7 Jun 2019 12:30:37 -0400
Subject: [PATCH v2] tableam: Fix cosmetic mistakes related to
 index_build_range_scan.

tableam.h refers to the 3rd parameter as index_nfo, but that seems to
be missing a letter.  Change it to index_info.

Also, most of the code thinks that the 8th parameter is the number of
blocks, but one declaration thinks that it's the ending block number.
Repair this inconsistency.

Discussion: http://postgr.es/m/CA+TgmoY49ManQWnJtiwkuytXBkmyTuDFqb74Pr4Zn2Nq9TuNBQ@mail.gmail.com
---
 src/include/access/tableam.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/include/access/tableam.h b/src/include/access/tableam.h
index 0b6ac15d31..9f61d44aa0 100644
--- a/src/include/access/tableam.h
+++ b/src/include/access/tableam.h
@@ -538,12 +538,12 @@ typedef struct TableAmRoutine
 	/* see table_index_build_range_scan for reference about parameters */
 	double		(*index_build_range_scan) (Relation heap_rel,
 										   Relation index_rel,
-										   struct IndexInfo *index_nfo,
+										   struct IndexInfo *index_info,
 										   bool allow_sync,
 										   bool anyvisible,
 										   bool progress,
 										   BlockNumber start_blockno,
-										   BlockNumber end_blockno,
+										   BlockNumber numblocks,
 										   IndexBuildCallback callback,
 										   void *callback_state,
 										   TableScanDesc scan);
@@ -1499,7 +1499,7 @@ table_scan_analyze_next_tuple(TableScanDesc scan, TransactionId OldestXmin,
 static inline double
 table_index_build_scan(Relation heap_rel,
 					   Relation index_rel,
-					   struct IndexInfo *index_nfo,
+					   struct IndexInfo *index_info,
 					   bool allow_sync,
 					   bool progress,
 					   IndexBuildCallback callback,
@@ -1508,7 +1508,7 @@ table_index_build_scan(Relation heap_rel,
 {
 	return heap_rel->rd_tableam->index_build_range_scan(heap_rel,
 														index_rel,
-														index_nfo,
+														index_info,
 														allow_sync,
 														false,
 														progress,
@@ -1532,7 +1532,7 @@ table_index_build_scan(Relation heap_rel,
 static inline double
 table_index_build_range_scan(Relation heap_rel,
 							 Relation index_rel,
-							 struct IndexInfo *index_nfo,
+							 struct IndexInfo *index_info,
 							 bool allow_sync,
 							 bool anyvisible,
 							 bool progress,
@@ -1544,7 +1544,7 @@ table_index_build_range_scan(Relation heap_rel,
 {
 	return heap_rel->rd_tableam->index_build_range_scan(heap_rel,
 														index_rel,
-														index_nfo,
+														index_info,
 														allow_sync,
 														anyvisible,
 														progress,
-- 
2.17.2 (Apple Git-113)

