From: Emi Lu <emilu@encs.concordia.ca>
To: pgsql-sql@postgresql.org
Cc: jcigar@ulb.ac.be
Cc: Karsten.Hilbert@gmx.net
Cc: eldin00@gmail.com
Subject: Re: column type for pdf file
Date: Thu, 19 May 2011 09:39:54 -0400
Message-ID: <4DD51DAA.4010706@encs.concordia.ca> (raw)
In-Reply-To: <4DD4B1EB.50202@techbaza.pl>
References: <4DD42A1C.30202@encs.concordia.ca>
<4DD4301F.4010403@ulb.ac.be>
<20110518210041.GF2498@hermes.hilbert.loc>
<4DD43867.2040709@ulb.ac.be>
<4DD47D28.3070207@postnewspapers.com.au>
<4DD4B1EB.50202@techbaza.pl>
Hello all,
All right, it seems that everyone thinks saving a pdf into postgresql is
not a good idea.
My situation is:
=====================
. pdf file: 500kb
. One year I need to save around 65 files = 32M
As a summary, disadvantages are:
==================================
. Memory issue when read/save/retrieve the file
. Consume connections
. Increase load
. during transaction lo may be lost?
. file systems do better than DB
. storing a reference to a file stored outside the database is
preferable
If I miss anything, please add them.
I am curious, for what circumstances, should the lo be used in postgresql?
Thanks a lot!
Emi
On 05/19/2011 02:00 AM, Piotr Czekalski wrote:
> Right!
> The external binary file storage has another advantage (that may be
> considered as disadvantage as well) - it is usually easier to develop
> and test mechanism as you're able to browse uploaded file result using
> os / application or even "exchange" file contents for test purposes,
> while in case of iternal storage you need some extra code to do it for
> you and you newer know, if it works well. Another problem is caching /
> feeding files in case of heavy load condition - caching of huge objects
> is problematic while you never know the dimension of the problem,
> non-caching approach may cause bottlenecks on frequent database reads.
> I was considering both scenarios and finally've choosen external storage
> for our invoice generation system.
>
> Regards,
>
> Piotr
>
>
--
Emi Lu, ENCS, Concordia University, Montreal H3G 1M8
emilu@encs.concordia.ca +1 514 848-2424 x5884
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: emilu@encs.concordia.ca, jcigar@ulb.ac.be, Karsten.Hilbert@gmx.net, eldin00@gmail.com
Subject: Re: column type for pdf file
In-Reply-To: <4DD51DAA.4010706@encs.concordia.ca>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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