News for hackers. Stuff that matters.
Re:Wal-E: Continuous Archiving for Postgres by craigkerstiens on Sunday February 05, 2017 @12:55PM (#13573527)
At a high-level they're very similar in the problem they solve, both are focused on giving you reliable disaster recovery. At the time Wal-E was written barman didn't exist and S3 was one of the few reliable options to backup to (this was over 5 years ago). Since then Wal-E has expanded to include just about every object store you could want, and at the same time 2Q introduced barman as their take on it.

Wal-E has been used for a number of years to provide disaster recovery for Heroku Postgres, for over a million databases. It enables their follow and fork functionality, and we're using it at Citus as well for Citus Cloud given we have the person that authored it.

As for exact differences I'm less familiar as I've not seriously run barman in production so perhaps someone that's run both can chime in.

Re:Wal-E: Continuous Archiving for Postgres by icebraining on Sunday February 05, 2017 @02:00PM (#13573888)
It enables their follow and fork functionality

Doesn't WAL replication only let you restore a full cluster, not a single DB? How do they get around that?

Re:Wal-E: Continuous Archiving for Postgres by craigkerstiens on Sunday February 05, 2017 @02:02PM (#13573902)
Correct, fork and follow isn't enabled on the multi-tenant level. Well, sort of, for some of the production level plans that are multi-tenant there is still a single Postgres cluster running but multiple of those on a node. Wal-E in those cases running for each one.
Re:Wal-E: Continuous Archiving for Postgres by icebraining on Sunday February 05, 2017 @02:06PM (#13573930)
It's a shame, though. Having to do WAL replication for DR plus logical backups to enable per-db restores is such a waste :|
Re:Wal-E: Continuous Archiving for Postgres by user5994461 on Sunday February 05, 2017 @03:04PM (#13574264)
The real waste: Wal-e is constantly writing the transaction logs, doesn't matter if there are writes or not.

(Read: a new 10MB file to S3 every 10sec, even when the DB is 100% idle).

Re:Wal-E: Continuous Archiving for Postgres by icebraining on Sunday February 05, 2017 @03:42PM (#13574519)
That's weird, what's your checkpoint_timeout? The default is 5 minutes, so you certainly shouldn't be pushing to S3 every 10s if the DB is idle.

Apparently PG 10 will improve your use case, though: http://paquier.xyz/postgresql-2/postgres-10-checkpoint-skip/

EDIT: Also, wal-e compresses by default, so even those regular WAL files should be much smaller than 10MB. Are you sure the DB is really idle?

Re:Wal-E: Continuous Archiving for Postgres by user5994461 on Sunday February 05, 2017 @05:05PM (#13574930)
There is a setting for the time interval. That's not the point. I'm not gonna delay replication and backup by minutes just because the replication system sucks. I'd rather pay the storage for my use case.

Compression is enabled indeed. Surprisingly, the compression ratio for "nothing going on" is terrible. (still multiple MBytes).

The next version of postgre will redo the transaction log to have dynamic adaptive sizing, with new settings to control it. Not there yet.

Re:Wal-E: Continuous Archiving for Postgres by icebraining on Sunday February 05, 2017 @05:38PM (#13575122)
AFAIK the dynamic WAL sizing has already landed in 9.5: http://www.databasesoup.com/2016/01/configuration-changes-in...

Or is this something else you're talking about?

Re:Wal-E: Continuous Archiving for Postgres by user5994461 on Monday February 06, 2017 @01:52PM (#13582671)
Yes, I'm talking about that and it's in 9.5 (which was released recently)
Re:Wal-E: Continuous Archiving for Postgres by wiredfool on Monday February 06, 2017 @08:54AM (#13579399)
That sounds like your archive_timeout is set to 10 seconds. (or close, as WAL segments are 16MB pre-compression).

That's the maximum age of a WAL segment before rotation, and Postgres will force the log rotation even if there's no data in the WAL segment.

If you're worried about keeping the last n seconds of data in replication, streaming replication is a far better tactic than log-shipping. (Though log shipping is useful for longer term storage)

Re:Wal-E: Continuous Archiving for Postgres by _Codemonkeyism on Sunday February 05, 2017 @01:15PM (#13573620)
Thanks for your insight, I have no clue but will need a backup to pg in the next months, so this helped.
Re:Wal-E: Continuous Archiving for Postgres by icebraining on Sunday February 05, 2017 @01:30PM (#13573695)
Just came from a nice presentation on the PG backup fundamentals, I highly recommend watching it when the video comes online: https://fosdem.org/2017/schedule/event/postgresql_backup/
Re:Wal-E: Continuous Archiving for Postgres by TwistedWave on Monday February 06, 2017 @12:52PM (#13582025)
The video is online now.
Re:Wal-E: Continuous Archiving for Postgres by _Codemonkeyism on Wednesday February 08, 2017 @02:53AM (#13596613)
Thanks!