Improvements in Copy From - Mailing list pgsql-hackers

From vignesh C
Subject Improvements in Copy From
Date
Msg-id CALDaNm0H2Nrc04utvJjMF_T73pbRAVUE3FPcqLeC=_kp8kmGtw@mail.gmail.com
Whole thread Raw
Responses Re: Improvements in Copy From  (vignesh C <vignesh21@gmail.com>)
Re: Improvements in Copy From  (David Rowley <dgrowleyml@gmail.com>)
Re: Improvements in Copy From  (Surafel Temesgen <surafel3000@gmail.com>)
List pgsql-hackers
Hi,

While reviewing copy from I identified few  improvements for copy from
that can be done :
a) copy from stdin copies lesser amount of data to buffer even though
space is available in buffer because minread was passed as 1 to
CopyGetData, Hence it only reads until the data read from libpq is
less than minread. This can be fixed by passing the actual space
available in buffer, this reduces the unnecessary frequent calls to
CopyGetData.
b) CopyMultiInsertInfoNextFreeSlot had an unused function parameter
that is not being used, it can be removed.
c) Copy from reads header line and do nothing for the header line, we
need not clear EOL & need not convert to server encoding for the
header line.

Attached patch has the changes for the same.
Thoughts?

Regards,
Vignesh
EnterpriseDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Daniel Gustafsson
Date:
Subject: Re: Improving connection scalability: GetSnapshotData()
Next
From: Stephen Frost
Date:
Subject: Re: Remove Deprecated Exclusive Backup Mode