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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy