Re: How to store fixed size images?

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: How to store fixed size images?
Дата
Msg-id CAMkU=1xT9prj_2Gh7deQ4mEoHMzETB_DV=hZrrSBRwnOEwauJA@mail.gmail.com
обсуждение исходный текст
Ответ на How to store fixed size images?  (sunpeng <bluevaley@gmail.com>)
Ответы Re: How to store fixed size images?
Список pgsql-general
On Mon, Jun 16, 2014 at 6:10 PM, sunpeng <bluevaley@gmail.com> wrote:
> We have many small size(most fixed size) images, how to store them? There
> are two options:
> 1. Store images in folders, managed by os file system, only store path in
> postgresql
> 2. Store image as bytea in postgresql
> How do you usually store images?

I use method 1, because the library/modules I made use of only
implemented that method.  I'd prefer to use method 2, but not enough
to write the code for doing it when there was existing code.  The
problem with 1 is now you have two streams of data to back up, and the
data itself is no longer transactional with its metadata.  A potential
problem with 2 is that it will run into problems if any of the data is
more than a small fraction of RAM.  So the images must be "always
small".  If they are just "usually small", that isn't good enough.
Another problem with bytea is the encoding issues.  Good up-to-date
drivers will handle that for you (mostly) transparently, but there are
lots of drivers that are not good, or not up-to-date.

Cheers,

Jeff


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

Предыдущее
От: Keith Fiske
Дата:
Сообщение: Re: HOT standby with ONLY WAL shipping?
Следующее
От: Khangelani Gama
Дата:
Сообщение: Re: pg_restore: custom archiver unexpected end of file , ERROR: missing data for column