Re: How to store fixed size images?

From: sunpeng <bluevaley(at)gmail(dot)com>
To: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
Cc: PostgreSQL general <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to store fixed size images?
Date: 2014-06-19 14:41:58
Message-ID: CAOYKhLo0+eeakp37g7mjjokN3qXo0jB9QLTVKcQFh+CLqVKv_Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you, Jeff!
peng

On Wed, Jun 18, 2014 at 12:15 AM, Jeff Janes <jeff(dot)janes(at)gmail(dot)com> wrote:

> On Mon, Jun 16, 2014 at 6:10 PM, sunpeng <bluevaley(at)gmail(dot)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
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Rémi Cura 2014-06-19 14:50:41 python modul pre-import to avoid importing each time
Previous Message Edson Richter 2014-06-19 14:39:45 Re : Global value/global variable?