Re: libpq: PQgetCopyData() and allocation overhead

From: Jelte Fennema <postgres(at)jeltef(dot)nl>
To: Jeroen Vermeulen <jtvjtv(at)gmail(dot)com>
Cc: daniel(at)yesql(dot)se, Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: libpq: PQgetCopyData() and allocation overhead
Date: 2023-03-03 15:52:23
Message-ID: CAGECzQQYS4V5wR27DV8x8oQosMAkW1D6gZDUETpc1jkCw6vSGQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 2 Mar 2023 at 20:45, Jeroen Vermeulen <jtvjtv(at)gmail(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2023-03-03 16:02:30 running logical replication as the subscription owner
Previous Message Sébastien Lardière 2023-03-03 15:52:01 Re: Timeline ID hexadecimal format