> On Dec 6, 2016, at 1:09 PM, Eric Schwarzenbach <subscriber@blackbrook.org> wrote:
>
> I've often wondered if we'd have been better off storing the files in the database. This design decision was made
someyears ago, and our concerns around this had to do with performance, but I don't know that we had any real data that
thisshould have been a concern, and I suspect you could ameliorate if not eliminate this as an issue by careful design.
I'dloved to hear this idea confirmed or debunked by someone who has more expertise (and ideally, done actual testing).
I have been storing PDFs in Postgres for several years without any problems. Documents range in size from a few pages
to100+ pages. I'm using a bytea column, not large objects. I store the documents in a separate database from the rest
ofthe application data in order to make it easy to exclude in database dumps or backup in some other way. I'm currently
managingabout 600,000 documents.
I created some functions that enable a subset of the document database to be synchronized elsewhere. For example, we
needto keep only the last 3 years of documents on a website for user access. Using Postgres has made this easy to
manageand verify. And with replication we automatically have the document database available on the backup web server
withoutadditional effort.
John DeSoi, Ph.D.