Hacker News new | ask | show | jobs
by kamaln7 2681 days ago
Kamal from DigitalOcean here. With only a primary node and no standby nodes, a failure will cause a new replacement node to be created with its data being a combination of the latest backup and the write-ahead log. This will get you the most recent data possible. Check out this page for more info on auto failover and how it works with the different configurations: https://www.digitalocean.com/docs/databases/resources/high-a...
2 comments

How is the WAL stored? If there is a problem with the storage, networking, or DC, you will not be able to get the WAL in order to bring up the DB in a new region. Also, the process of replaying WAL since last backup can take a very long time for a high traffic DB, during which time it is going to be completely unavailable.
The WAL and all backups are stored offsite and are completely handled on our end.

Re: availability, that’s right if you only have a primary node and no standby ones. Like manigandham said, there won’t be any downtime if you have a standby node.

That's what a standby server is for, so that it's up to date without replaying the WAL. Nothing unique to DigitalOcean about that.
Thanks, that answers the question on 0 standbys.

Do you also happen to know the answer on synchronous vs asynchronous replication?

No problem. It’s asynchronous
Thanks. Will you offer a synchronous version in the future?

Since asynchronous means that you can lose previously acknowledged writes when the primary node crashes, which forbids many use cases (for example, most things involving money).

And Postgres already offers synchronous replication modes.

No concrete plans for sync replication that I know of. The team is aware of the need for it but there's not much info to share at the moment.