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

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 (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-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

pgsql-bugs by date

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

pgsql-general by date

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

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