From: | Eduardo Morras <emorrasg(at)yahoo(dot)es> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Storing files: 2.3TBytes, 17M file count |
Date: | 2016-11-28 19:37:49 |
Message-ID: | 20161128203749.3e8002605dcb6406af48375d@yahoo.es |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Mon, 28 Nov 2016 15:28:28 +0100
Thomas Güttler <guettliml(at)thomas-guettler(dot)de> wrote:
> Hi,
>
> Up to now, we don't store files in PostgreSQL.
>
> I was told, that you must not do this .... But this was 20 years ago.
>
>
> I have 2.3TBytes of files. File count is 17M
>
> Up to now we use rsync (via rsnapshot) to backup our data.
>
> But it takes longer and longer for rsync to detect
> the changes. Rsync checks many files. But daily only
> very few files really change. More than 99.9% don't.
>
> Since we already store our structured data in postgres, I think
> about storing the files in PostgreSQL, too.
>
> What is the current state of the art?
>
> Is it feasible to store file in PostgreSQL?
Yes and no, it's another level of indirection, slower than pure
filesystem solution.
Rsync checks last read/access time, last write/modification time and
file hash before copying it. If no one of those metadata change, rsync
don't copy it. File hash must be recalculated if access time and
modification time change.
> Are there already projects which use PostgreSQL as storage backend?
>
> I have the hope, that it would be easier to backup only the files
> which changed.
Rsync tries to backup only the files that changed. There are other
tools like cpdup, don't know if it's ported to linux, It's similar to
rsync.
You can use a p2p system, unlike ftp, rsync, etc they store a full Tree Hash (Tiger Tree Hash often) of file content to allow multi peer to peer copy.
> Regards,
> Thomas Güttler
>
>
> Related question at rsnapshot mailing list:
> https://sourceforge.net/p/rsnapshot/mailman/rsnapshot-discuss/thread/57A1A2F3(dot)5090409(at)thomas-guettler(dot)de/
> --
> Thomas Guettler http://www.thomas-guettler.de/
>
--- ---
Eduardo Morras <emorrasg(at)yahoo(dot)es>
From | Date | Subject | |
---|---|---|---|
Next Message | greigwise | 2016-11-28 20:45:31 | Re: Query with large in clauses uses a lot of memory |
Previous Message | Devin Smith | 2016-11-28 19:11:49 | Bad query? Or planner? |