Skip site navigation (1) Skip section navigation (2)

Re: Libpq COPY optimization patch

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alon Goldshuv" <agoldshuv(at)greenplum(dot)com>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: Libpq COPY optimization patch
Date: 2006-01-24 15:36:35
Message-ID: 18858.1138116995@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-patches
"Alon Goldshuv" <agoldshuv(at)greenplum(dot)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

In response to

Responses

pgsql-patches by date

Next:From: Alon GoldshuvDate: 2006-01-24 16:40:06
Subject: Re: Libpq COPY optimization patch
Previous:From: Alon GoldshuvDate: 2006-01-24 15:19:27
Subject: Re: Libpq COPY optimization patch

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group