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

From Jelte Fennema
Subject Re: libpq: PQgetCopyData() and allocation overhead
Date
Msg-id CAGECzQQYS4V5wR27DV8x8oQosMAkW1D6gZDUETpc1jkCw6vSGQ@mail.gmail.com
Whole thread Raw
In response to Re: libpq: PQgetCopyData() and allocation overhead  (Jeroen Vermeulen <jtvjtv@gmail.com>)
Responses Re: libpq: PQgetCopyData() and allocation overhead  (Jeroen Vermeulen <jtvjtv@gmail.com>)
Re: libpq: PQgetCopyData() and allocation overhead  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, 2 Mar 2023 at 20:45, Jeroen Vermeulen <jtvjtv@gmail.com> wrote:
> I'm attaching a diff now.  This is not a patch, it's just a discussion piece.

Did you try with PQExpBuffer? I still think that probably fits better
in the API design of libpq. Obviously if it's significantly slower
than the callback approach in this patch then it's worth considering
using the callback approach. Overall it definitely seems reasonable to
me to have an API that doesn't do an allocation per row.



pgsql-hackers by date:

Previous
From: Sébastien Lardière
Date:
Subject: Re: Timeline ID hexadecimal format
Next
From: Robert Haas
Date:
Subject: running logical replication as the subscription owner