[PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM
Date: 2020-06-26 09:46:30
Message-ID: CALj2ACXcCKaGPY0whowqrJ4OPJvDnTssgpGCzvuFQu5z0CXb-g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
v1-0001-Remove-Extra-palloc-Of-raw_buf-For-Binary-Format-.patch application/octet-stream 1.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2020-06-26 09:59:21 Re: [Patch] ALTER SYSTEM READ ONLY
Previous Message Sébastien Lardière 2020-06-26 09:12:45 Re: PostgreSQL 13 Beta 1 Release Announcement Draft