Re: copy.c allocation constant - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: copy.c allocation constant
Date
Msg-id 20180124031414.GD17109@momjian.us
Whole thread Raw
In response to copy.c allocation constant  (Andrew Dunstan <andrew.dunstan@2ndquadrant.com>)
Responses Re: copy.c allocation constant
List 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 by date:

Previous
From: Amit Kapila
Date:
Subject: Re: pgsql: Allow UPDATE to move rows between partitions.
Next
From: Bruce Momjian
Date:
Subject: Re: pgindent run?