Re: `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this - Mailing list pgsql-general

From Dan Kortschak
Subject Re: `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this
Date
Msg-id 1255397394.3427.28.camel@zoidberg.mbs.adelaide.edu.au
Whole thread Raw
In response to Re: `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this  (Stephen Frost <sfrost@snowman.net>)
List pgsql-general
Thanks again.

On Mon, 2009-10-12 at 21:14 -0400, Stephen Frost wrote:
> > Seems like the way to go, though it will be significantly slower
> than
> > psql or superuser reads (a couple of tables have ~10s-100sM rows).
>
> Erm, really?  You've tested that and found it to be that much slower?

Sorry, question mark left out - that is how I have gone.

> Being able to read from any file the *unix* PG user can read from
> means
> you can access any file in the database..  Pretty serious from a
> security standpoint.  Not sure what you're expecting here.

Yeah, didn't think of that. Thanks.

On Tue, 2009-10-13 at 02:13 +0100, Sam Mason wrote:
> Unless perl is doing some very funky stuff I'd expect you'll be waiting
> for the disks most of the time, Perl will just be shoving blocks of data
> around and this is fast.  If performance is really your thing then C may
> help.

See comment above - more of a question than a statement.

> "stdin" effectively just means data from the client, the filesystem
> would be from "inside" the server and hence in the presence of a
> malicious client letting it do stuff with its own query seems OK whereas
> the server's filesystem is an authority you probably don't want to go
> spreading too widely and hence is limited to userusers.

That makes sense - thanks for the explanation.

cheers all


pgsql-general by date:

Previous
From: Stephen Frost
Date:
Subject: Re: `must be superuser to COPY to or from a file' - using perl DBI - approaches to work around this
Next
From: 纪晓曦
Date:
Subject: Re: Where can I get the number of plans that considered by Planner?