Re: column type for pdf file

From: Emi Lu <emilu(at)encs(dot)concordia(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Cc: jcigar(at)ulb(dot)ac(dot)be, Karsten(dot)Hilbert(at)gmx(dot)net, eldin00(at)gmail(dot)com
Subject: Re: column type for pdf file
Date: 2011-05-19 13:39:54
Message-ID: 4DD51DAA.4010706@encs.concordia.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)encs(dot)concordia(dot)ca +1 514 848-2424 x5884

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Karsten Hilbert 2011-05-19 13:53:31 Re: column type for pdf file
Previous Message Gary Stainburn 2011-05-19 08:38:47 Re: SOLVED - foreign keys and lots of tables