Re: copy.c allocation constant

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: copy.c allocation constant
Дата
Msg-id 20180124031414.GD17109@momjian.us
обсуждение исходный текст
Ответ на copy.c allocation constant  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Ответы Re: copy.c allocation constant
Список pgsql-hackers
On Tue, Nov 28, 2017 at 11:51:28AM -0500, Andrew Dunstan wrote:
> 
> 
> 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.

Coming in late here, but it does seem very odd.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

+ As you are, so once was I.  As I am, so you will be. +
+                      Ancient Roman grave inscription +


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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: pgsql: Allow UPDATE to move rows between partitions.
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: pgindent run?