libpq: PQgetCopyData() and allocation overhead - Mailing list pgsql-hackers

From Jeroen Vermeulen
Subject libpq: PQgetCopyData() and allocation overhead
Date
Msg-id CA+zULE5AYd+78w7Uu7jN=5N3w-9vsKuK2WrpjkKwS65hyhWfbw@mail.gmail.com
Whole thread Raw
Responses Re: libpq: PQgetCopyData() and allocation overhead
List pgsql-hackers
Would there be interest in a variant of PQgetCopyData() that re-uses the same buffer for a new row, rather than allocating a new buffer on each iteration?

I tried it on a toy benchmark, and it reduced client-side CPU time by about 12%.  (Less of a difference in wall-clock time of course; the client was only using the CPU for a bit over half the time.)


Jeroen

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Importing pg_bsd_indent into our source tree
Next
From: Peter Geoghegan
Date:
Subject: Re: Minor meson gripe