On 7/2/20 5:37 PM, Tom Lane wrote:
> Joe Conway <mail@joeconway.com> writes:
>> In fact, in principle there is no reason we can't get to max - 4 with this code
>> except that when the filesize is exactly 1073741819, we need to try to read one
>> more byte to find the EOF that way I did in my patch. I.e.:
>
> Ah, right, *that* is where the extra byte is lost: we need a buffer
> workspace one byte more than the file size, or we won't ever actually
> see the EOF indication.
>
> I still can't get excited about contorting the code to remove that
> issue.
It doesn't seem much worse than the oom test that was there before -- see attached.
In any case I will give you the last word and then quit bugging you about it ;-)
Are we in agreement that whatever gets pushed should be backpatched through pg11
(see start of thread)?
Joe
--
Crunchy Data - http://crunchydata.com
PostgreSQL Support for Secure Enterprises
Consulting, Training, & Open Source Development