Re: Libpq COPY optimization patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: Libpq COPY optimization patch
Date
Msg-id 18858.1138116995@sss.pgh.pa.us
Whole thread Raw
In response to Re: Libpq COPY optimization patch  ("Alon Goldshuv" <agoldshuv@greenplum.com>)
Responses Re: Libpq COPY optimization patch  ("Alon Goldshuv" <agoldshuv@greenplum.com>)
Re: Libpq COPY optimization patch  ("Alon Goldshuv" <agoldshuv@greenplum.com>)
List pgsql-patches
"Alon Goldshuv" <agoldshuv@greenplum.com> writes:
> I guess that although parseInput is cheap we could still use a conditional
> to see when data was sent and only then call it (without PQconsumeInput)
> instead of calling it every single time PQputCopyData is called. Any
> objection to that?

You mean something like

    if (input-buffer-not-empty)
        parseInput();

?  This still bothers me a bit since it's a mixing of logic levels;
PQputCopyData is an output routine, it shouldn't be getting its fingers
dirty with input buffer contents.  I'm willing to tolerate this if it
can be demonstrated that it provides a useful performance gain compared
to the unconditional parseInput call, but let's see some numbers.

            regards, tom lane

pgsql-patches by date:

Previous
From: "Alon Goldshuv"
Date:
Subject: Re: Libpq COPY optimization patch
Next
From: "Alon Goldshuv"
Date:
Subject: Re: Libpq COPY optimization patch