The conversation

Lessons learnedExperience excerpt · English

It's particularly nice as it allows to do point in time recovery - you can tell PostgreSQL to …

It's particularly nice as it allows to do point in time recovery - you can tell PostgreSQL to replay WALs up to a given point so if say corruption happened because of some code bug you could play the database to the point minute before. Backup process is two part * archive logs as they come in - PostgreSQL have hook that will run program with the WAL segment to archive so just need to put whatever you want to use to backup it with there * start backup from PostgreSQL - that will stop it writing to the DB files and only write to WALs - and just copy the database directory files. Then tell PostgreSQL to resume writing to them. No need for anything fancy like file snapshots. So just copying files really. Restore is just restore the above and feed it WALs to the chosen point. We also run slave so master being shot would only kill running transactions, fancier setups I've seen also run "delayed slave" - slave that replays non-current WAL so basically presents view of database from say 1 hour or 1 day ago. …

Original discussionMy manager spent $1M on a backup server that I never used234 source comments · at import
3

What was this responding to?

Parent context · original excerpt

DI

Very likely you're right, as mentioned in another comment (and in the article I think) I didnt know the semantics of the backup system, I’d just tested with a couple of 400G HDDs - then suddenly the NFS endpoint I was given was behaving strangely. We have the benefit of hindsight now so things can be more clear than they were at the time, nonetheless: WAL shipping without ever reading sounds hopeful, I don't personally believe in backups that are never verified.

Full original

Community replies 0

No community replies yet. Add your perspective.

Replies from the source 3

Direct replies available in this import. Original-language excerpts.

AP

I believe games usually have assets too and not just metadata, would you put gbs of data in Postgres row ?

Full original
XU

I'm a bit green when it comes to db back ups. Do you have anything I can read on this approach it sounds really promising but I don't think I understand it?

Full original
DI

You sound like you know what you're talking about so then you probably know that WAL shipping requires the inverse to be working too. Your replica needs the ability to read from the WAL storage in the event that you have high transactional throughput. If you have a low volume then maybe you've never seen it, but it's in the documentation here: https://www.postgresql.org/docs/11/archive-recovery-settings...

Full original
Continue on Hacker News

Respect different perspectives. Share concrete experiences.

Sign in to post, reply, repost, and quote.