Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9a83afe

Browse files
committed
Widen tuple counter variables from long to int64
Mistake in ab0dfc9; progress reporting would have wrapped around for indexes created with more than 2^31 tuples. Reported-by: Peter Geoghegan Discussion: https://postgr.es/m/CAH2-Wz=WbNxc5ob5NJ9yqo2RMJ0q4HXDS30GVCobeCvC9A1L9A@mail.gmail.com
1 parent 3dbb317 commit 9a83afe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/access/hash/hashsort.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void
118118
_h_indexbuild(HSpool *hspool, Relation heapRel)
119119
{
120120
IndexTuple itup;
121-
long tups_done = 0;
121+
int64 tups_done = 0;
122122
#ifdef USE_ASSERT_CHECKING
123123
uint32 hashkey = 0;
124124
#endif

src/backend/access/nbtree/nbtsort.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,7 @@ _bt_load(BTWriteState *wstate, BTSpool *btspool, BTSpool *btspool2)
11301130
int i,
11311131
keysz = IndexRelationGetNumberOfKeyAttributes(wstate->index);
11321132
SortSupport sortKeys;
1133-
long tuples_done = 0;
1133+
int64 tuples_done = 0;
11341134

11351135
if (merge)
11361136
{

0 commit comments

Comments
 (0)