Re: Servlet uplad with Multipart and LO - Mailing list pgsql-jdbc

From Toby Doig
Subject Re: Servlet uplad with Multipart and LO
Date
Msg-id 20020703105658.X71766-100000@plum.flirble.org
Whole thread Raw
In response to Servlet uplad with Multipart and LO  (Dror Matalon <dror@zapatec.com>)
List pgsql-jdbc
> 3. Save the uploaded file in a LO (Large Object).
> Pros: Much faster than bytea,
> Cons: Limited permissions. Anyone that has access to the database can
> get to the LO. Slower than file storage.

this is the approach I use because it has the added bonus of backing up
your data using replication. if you store everything in the database then
backing up the db backs up everything. also, if you give all your
webserver nodes access to teh db then there's no mucking about with files
etc. i understand there's a performance hit involved but the
administrative benefits are superb.

by the way, if performance is a real issue then you could store the file
in the db and cache a local copy of each web node. check the file mod date
before serving and then serve up the local copy. to introduce a new web
node just dump it in the cluster and it'll build up its own cache. when
disk space gets low just clear the cache. simple.

t




pgsql-jdbc by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: switching db's on the fly
Next
From: "Th Templ"
Date:
Subject: Re: Problem with sql function LOWER