copy.c allocation constant

Поиск
Список
Период
Сортировка
От Andrew Dunstan
Тема copy.c allocation constant
Дата
Msg-id be36afdf-8b01-fe4a-0328-2a6cd9540ad3@2ndQuadrant.com
обсуждение исходный текст
Ответы Re: copy.c allocation constant
Список pgsql-hackers

While reading copy.c I noticed this line:


#define RAW_BUF_SIZE 65536        /* we palloc RAW_BUF_SIZE+1 bytes */


Doesn't that seem rather odd? If we're adding 1 wouldn't it be better as
65535 so we palloc a power of 2?


I have no idea if this affects performance, but it did strike me as strange.


cheers


andrew

-- 
Andrew Dunstan                https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] SQL procedures
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: documentation is now XML