| From: | Jeff Davis <pgsql(at)j-davis(dot)com> | 
|---|---|
| To: | Simon Riggs <simon(at)2ndQuadrant(dot)com> | 
| Cc: | Daniel Farina <drfarina(at)gmail(dot)com>, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Hannu Krosing <hannu(at)krosing(dot)net>, Greg Smith <greg(at)2ndquadrant(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Daniel Farina <dfarina(at)truviso(dot)com>, pgsql-hackers(at)postgresql(dot)org | 
| Subject: | Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION | 
| Date: | 2009-11-27 20:55:49 | 
| Message-ID: | 1259355349.19289.536.camel@jdavis | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Fri, 2009-11-27 at 13:39 +0000, Simon Riggs wrote:
> On Tue, 2009-11-24 at 22:13 -0800, Jeff Davis wrote:
> 
> > My disagreement with the row-by-row approach is more semantics than
> > performance. COPY translates records to bytes and vice-versa, and your
> > original patch maintains those semantics.
> 
> The bytes <-> records conversion is a costly one. Anything we can do to
> avoid that in either direction will be worth it. I would regard
> performance as being part/most of the reason to support this.
> 
Right. I was responding to an idea that copy support sending records
from a table to a function, or from a function to a table, which is
something that INSERT/SELECT can already do.
Our use case is a table to a remote table, so it would go something
like:
 1. COPY TO WITH BINARY on local node
 2. stream output bytes from #1 to remote node
 3. COPY FROM WITH BINARY on remote node
The only faster mechanism that I could imagine is sending the records
themselves, which would be machine-dependent.
Regards,
	Jeff Davis
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2009-11-27 21:16:54 | Re: OpenSSL key renegotiation with patched openssl | 
| Previous Message | Dave Cramer | 2009-11-27 20:34:09 | OpenSSL key renegotiation with patched openssl |