Since we expect that the max_bytes is in bytes, not in kilobytes, it
should not be multiplied by 1024.
Introduced by
30e144287a.
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
ts->context = CurrentMemoryContext;
/* choose the maxBlockSize to be no larger than 1/16 of max_bytes */
- while (16 * maxBlockSize > max_bytes * 1024L)
+ while (16 * maxBlockSize > max_bytes)
maxBlockSize >>= 1;
if (maxBlockSize < ALLOCSET_DEFAULT_INITSIZE)