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

Commit 4edb37e

Browse files
Fix a calculation in TidStoreCreate().
Since we expect that the max_bytes is in bytes, not in kilobytes, it should not be multiplied by 1024. Introduced by 30e1442. Reported-by: John Naylor, David Rowley Reviewed-by: John Naylor Discussion: https://postgr.es/m/CANWCAZZTE-14ofsucofTuhFsfuDGBNf%3DNZb22TMYT8bxA41oQQ%40mail.gmail.com Discussion: https://postgr.es/m/CAApHDvojg82NDaDEpj1WEZSbVTafj%3DDRmW%2BFrkBdW8ScL4OFxA%40mail.gmail.com
1 parent 3a4837f commit 4edb37e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/access/common/tidstore.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ TidStoreCreate(size_t max_bytes, dsa_area *area, int tranche_id)
130130
ts->context = CurrentMemoryContext;
131131

132132
/* choose the maxBlockSize to be no larger than 1/16 of max_bytes */
133-
while (16 * maxBlockSize > max_bytes * 1024L)
133+
while (16 * maxBlockSize > max_bytes)
134134
maxBlockSize >>= 1;
135135

136136
if (maxBlockSize < ALLOCSET_DEFAULT_INITSIZE)

0 commit comments

Comments
 (0)