Re: images in database

Поиск
Список
Период
Сортировка
От Jan Wieck
Тема Re: images in database
Дата
Msg-id 3E8C34C1.9A05164B@Yahoo.com
обсуждение исходный текст
Ответ на Re: images in database  ("Nigel J. Andrews" <nandrews@investsystems.co.uk>)
Ответы Re: images in database  (Arjen van der Meijden <acm@tweakers.net>)
Список pgsql-general
Shridhar Daithankar wrote:
>
> On Thursday 03 April 2003 17:38, you wrote:
> >
> > In the end, we went with large objects because my tests showed them faster
> > than bytea and there could be large sized objects, a B64 encoding would
> > bloat the size (encode/decode time and size bloat were what slowed the
> > bytea down I think) and the large objects let us extract the file in
> > portions for streaming should we wish.
>
> Just wondering, how does it exactly differ from storing an image in a file and
> storing the filename in the database?

The image data would not be included in a database dump. So you loose
the ability to save a consistent snapshot.

The image data would not be accessible remotely except if made available
via network filesystems. Then you get permission and path problems.

The image data does not follow the same transactional semantics as all
other data. Due to MVCC, some process might actually have a write lock
on the row containing the filename and is right now writing to the file
while another process reads the old row and then the (intermediate mess
in the) file.

Rolling back a database transaction in case of whatever error will not
rollback changes to the image data.

Process (or system) crash in the middle of an update is not covered by
the databases crash recovery capability.


Enough reasons to forget about filename storage?


Jan

--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


В списке pgsql-general по дате отправления:

Предыдущее
От: Francesco Piccinini
Дата:
Сообщение: Tcl/Java/C++ support
Следующее
От: Arjen van der Meijden
Дата:
Сообщение: Re: images in database