Open Nutties93 opened 3 years ago
Without any logs, commands, etc. this is a bit challenging to troubleshoot.
Oh. I managed to resolve this. I realized that the MODE environment variable needs to be set to POSTGRES. Meanwhile, I was testing the replication. it works fine. However, when I tried to down the primary database. I'm unable to do a write to the other. Is there a way to implement an election between the databases so that the selection of the primary databases will be dynamic? like an etcd configuration or something?
Oh. I managed to resolve this. I realized that the MODE environment variable needs to be set to POSTGRES. Meanwhile, I was testing the replication. it works fine. However, when I tried to down the primary database. I'm unable to do a write to the other. Is there a way to implement an election between the databases so that the selection of the primary databases will be dynamic? like an etcd configuration or something?
@Nutties93 I know it's been a minute, but where you ever able to get the failover to work in swarm? I am getting ready to try this again. In the past a I had the same issues and aborted but it looks like theres been updates to the package.
Quote reply Reference i
This is from the future.
MODE=postgres [lower case]
is what you need to get past the deploy failing (as I just did)
Will test and report if replication and recovery fail
https://github.com/CrunchyData/crunchy-containers/tree/master/examples/docker/swarm-service
I have copied the docker-compose file and tried running it. However, the services are not starting. I tried to deploy only the primary service without replica, and it's still not running. Do you know what's the reason? Did it miss out on anything?