[PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM - Mailing list pgsql-hackers

From Bharath Rupireddy
Subject [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
Date
Msg-id CALj2ACXcCKaGPY0whowqrJ4OPJvDnTssgpGCzvuFQu5z0CXb-g@mail.gmail.com
Whole thread Raw
Responses Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM  (Rushabh Lathia <rushabh.lathia@gmail.com>)
List pgsql-hackers
Hi Hackers,

There seems to be an extra palloc of 64KB of raw_buf for binary format
files which is not required
as copy logic for binary files don't use raw_buf, instead, attribute_buf
is used in CopyReadBinaryAttribute.

Attached is a patch, which places a check to avoid this unnecessary 64KB palloc.

Request the community to take this patch, if it is useful.

With Regards,
Bharath Rupireddy.
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Sébastien Lardière
Date:
Subject: Re: PostgreSQL 13 Beta 1 Release Announcement Draft
Next
From: Michael Paquier
Date:
Subject: Re: [Patch] ALTER SYSTEM READ ONLY