copy.c allocation constant - Mailing list pgsql-hackers

From Andrew Dunstan
Subject copy.c allocation constant
Date
Msg-id be36afdf-8b01-fe4a-0328-2a6cd9540ad3@2ndQuadrant.com
Whole thread Raw
Responses Re: copy.c allocation constant  (Bruce Momjian <bruce@momjian.us>)
List 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 by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] SQL procedures
Next
From: Peter Eisentraut
Date:
Subject: Re: documentation is now XML