Joe Conway <m...@joeconway.com> writes: > The only downside is that the max filesize is reduced to (MaxAllocSize - > MIN_READ_SIZE - 1) compared to MaxAllocSize with the old method.
Hm, I was expecting that the last successful iteration of enlargeStringInfo would increase the buffer size to MaxAllocSize, so that we'd really only be losing one byte (which we can't avoid if we use stringinfo). But you're right that it's most likely moot since later manipulations of such a result would risk hitting overflows. I marked the CF entry as RFC. regards, tom lane