Re: BUG #1830: Non-super-user must be able to copy from a

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Bernard <bht(at)actrix(dot)gen(dot)nz>
Cc: pgsql-bugs(at)postgresql(dot)org, pgsql-general(at)postgresql(dot)org
Subject: Re: BUG #1830: Non-super-user must be able to copy from a
Date: 2005-08-19 02:11:38
Message-ID: 43053FDA.9000901@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs pgsql-general

Bernard wrote:

> This difference of performance is the main reason for the COPY
> command, and this is also the reason why bulk loading through the JDBC
> interface will never match the performance of the COPY fith files
> command.

In some admittedly unscientific tests I see less than 10% difference
between server-side COPY and client-side COPY FROM STDIN (psql's \copy
command) on a 28mb input file. That's down in the per-run noise.

Doing it via JDBC will undoubtably add some extra overhead, but I'd
estimate that it's about the same sort of overhead as writing your data
out to a file from Java in the first place takes.

If you've already got the data in a file, why not just use psql's \copy
command? This uses COPY FROM STDIN, reads the file as the user running
psql, and does not require superuser permissions.

> The whole architectural setup for such "bulk" loading is a mess.

Do you have a concrete suggestion for improving bulk loading that
doesn't open security holes?

-O

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Oliver Jowett 2005-08-19 02:14:24 Re: BUG #1830: Non-super-user must be able to copy from a
Previous Message William ZHANG 2005-08-19 02:07:03 Re: BUG #1830: Non-super-user must be able to copy from a

Browse pgsql-general by date

  From Date Subject
Next Message Oliver Jowett 2005-08-19 02:14:24 Re: BUG #1830: Non-super-user must be able to copy from a
Previous Message William ZHANG 2005-08-19 02:07:03 Re: BUG #1830: Non-super-user must be able to copy from a