Re: pg_read_file() with virtual files returns empty string

Поиск
Список
Период
Сортировка
От Joe Conway
Тема Re: pg_read_file() with virtual files returns empty string
Дата
Msg-id 84baf4c5-e89a-4716-5852-2a3245e69d90@joeconway.com
обсуждение исходный текст
Ответ на Re: pg_read_file() with virtual files returns empty string  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pg_read_file() with virtual files returns empty string  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jehan-Guillaume de Rorthais
Дата:
Сообщение: Re: [patch] demote
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pg_read_file() with virtual files returns empty string