pg.ddx.io pgsql-performance@postgresql.org mailing list archive
help / color / mirror / Atom feedStoring Large Objects
5+ messages / 3 participants
[nested] [flat]
* Storing Large Objects
@ 2005-04-18 06:09 brew@theMode.com
2005-04-18 06:18 ` Re: Storing Large Objects Tom Lane <tgl@sss.pgh.pa.us>
2005-04-18 15:21 ` Re: Storing Large Objects Bruno Wolff III <bruno@wolff.to>
0 siblings, 2 replies; 5+ messages in thread
From: brew@theMode.com @ 2005-04-18 06:09 UTC (permalink / raw)
To: pgsql-novice@postgresql.org
Hi All......
I'm writing a php web application which sells mp3 music for production
use (a rather limited audience, as opposed to a general mp3 download
site).
Since I've heard large objects were a bother I've written it so the mp3s
were in files with long obfuscated filenames and have put them in a
directory hidden behind basic authentication, planning a php front end to
the basic authentication and storing the file urls in the database. Now
I'm considering shortlived symbolic filenames to further make it difficult
to rip off the mp3 files by other users with valid log in credentials that
can get past the basic authentication.
Basically it's turning into one big unwieldy kluge.
I'm reading about large object php functions and am considering storing
the mp3s themselves as large objects in postgreSQL, rather than just the
filenames, and it's starting to look better and better! It would be very
easy to make it so that only the valid user could pull the mp3 large
object out of postgreSQL.
Is storing large objects as easy as the php functions make it look? What
about the pg_dump difficulties with large objects?
I'm using Debian Stable which has postgreSQL 7.2.1 and PHP 4.1.2 which so
far has been working fine with my small text databases, but I suspect if I
want to consider large objects I should really upgrade, eh?
TIA....
brew
==========================================================================
Strange Brew (brew@theMode.com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Storing Large Objects
2005-04-18 06:09 Storing Large Objects brew@theMode.com
@ 2005-04-18 06:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-18 06:47 ` Re: Storing Large Objects brew@theMode.com
1 sibling, 1 reply; 5+ messages in thread
From: Tom Lane @ 2005-04-18 06:18 UTC (permalink / raw)
To: brew@theMode.com; +Cc: pgsql-novice@postgresql.org
brew@theMode.com writes:
> I'm using Debian Stable which has postgreSQL 7.2.1 and PHP 4.1.2 which so
> far has been working fine with my small text databases, but I suspect if I
> want to consider large objects I should really upgrade, eh?
[ jaw drops... ] Debian Stable is shipping 7.2.**1**?
You might want to get yourself a more responsibly managed distro.
I won't necessarily argue with someone's decision to stick on the
7.2 major release, but not to adopt 7.2.* bug fixes is mere insanity.
7.2.1 was released more than three years ago and has multiple known
data-loss and security issues.
regards, tom lane
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Storing Large Objects
2005-04-18 06:09 Storing Large Objects brew@theMode.com
2005-04-18 06:18 ` Re: Storing Large Objects Tom Lane <tgl@sss.pgh.pa.us>
@ 2005-04-18 06:47 ` brew@theMode.com
0 siblings, 0 replies; 5+ messages in thread
From: brew@theMode.com @ 2005-04-18 06:47 UTC (permalink / raw)
To: pgsql-novice@postgresql.org
On Mon, 18 Apr 2005, Tom Lane wrote:
> [ jaw drops... ] Debian Stable is shipping 7.2.**1**?
>
> You might want to get yourself a more responsibly managed distro.
> I won't necessarily argue with someone's decision to stick on the
> 7.2 major release, but not to adopt 7.2.* bug fixes is mere insanity.
> 7.2.1 was released more than three years ago and has multiple known
> data-loss and security issues.
It's been recommended to me that I switch to testing, which is running
7.4.7 i think. And I've done that on my development laptop.
Maybe I should switch to that on my production server, too, since it's
working OK on my laptop.
It's a more recent version of php, too.
It's have been argued that Debian testing is at least as stable as
everybody elses stable and Debian stable is *really* stable. Although with
7.2.1 maybe not so secure.....
brew
==========================================================================
Strange Brew (brew@theMode.com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Storing Large Objects
2005-04-18 06:09 Storing Large Objects brew@theMode.com
@ 2005-04-18 15:21 ` Bruno Wolff III <bruno@wolff.to>
2005-04-19 00:44 ` Re: Storing Large Objects brew@theMode.com
1 sibling, 1 reply; 5+ messages in thread
From: Bruno Wolff III @ 2005-04-18 15:21 UTC (permalink / raw)
To: brew@theMode.com; +Cc: pgsql-novice@postgresql.org
On Mon, Apr 18, 2005 at 02:09:10 -0400,
brew@theMode.com wrote:
>
> Since I've heard large objects were a bother I've written it so the mp3s
> were in files with long obfuscated filenames and have put them in a
> directory hidden behind basic authentication, planning a php front end to
> the basic authentication and storing the file urls in the database. Now
> I'm considering shortlived symbolic filenames to further make it difficult
> to rip off the mp3 files by other users with valid log in credentials that
> can get past the basic authentication.
Why not put the files somewhere where only the application can get at them
instead of under the document root. That way they have to compromise your
application to get at them. No amount of url guessing will give direct
access.
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: Storing Large Objects
2005-04-18 06:09 Storing Large Objects brew@theMode.com
2005-04-18 15:21 ` Re: Storing Large Objects Bruno Wolff III <bruno@wolff.to>
@ 2005-04-19 00:44 ` brew@theMode.com
0 siblings, 0 replies; 5+ messages in thread
From: brew@theMode.com @ 2005-04-19 00:44 UTC (permalink / raw)
To: Bruno Wolff III <bruno@wolff.to>; +Cc: brew@theMode.com; pgsql-novice@postgresql.org
Bruno....
> Why not put the files somewhere where only the application can get at
> them instead of under the document root. That way they have to
> compromise your application to get at them. No amount of url guessing
> will give direct access.
Great idea. That's what I will do, no need to complicate my life (and
server) by storing the files as large objects in the database. It looks
like php's readfile function will do the job nicely.
Thanks Bruno!
brew
==========================================================================
Strange Brew (brew@theMode.com)
Check out my Stock Option Covered Call website http://www.callpix.com
and my Musician's Online Database Exchange http://www.TheMode.com
==========================================================================
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2005-04-19 00:44 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-04-18 06:09 Storing Large Objects brew@theMode.com
2005-04-18 06:18 ` Tom Lane <tgl@sss.pgh.pa.us>
2005-04-18 06:47 ` brew@theMode.com
2005-04-18 15:21 ` Bruno Wolff III <bruno@wolff.to>
2005-04-19 00:44 ` brew@theMode.com
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox