Re: column type for pdf file - Mailing list pgsql-sql

From Emi Lu
Subject Re: column type for pdf file
Date
Msg-id 4DD51DAA.4010706@encs.concordia.ca
Whole thread Raw
In response to Re: column type for pdf file  (Piotr Czekalski <pczekalski@techbaza.pl>)
Responses Re: column type for pdf file  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-sql
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


pgsql-sql by date:

Previous
From: Gary Stainburn
Date:
Subject: Re: SOLVED - foreign keys and lots of tables
Next
From: Karsten Hilbert
Date:
Subject: Re: column type for pdf file