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

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