Postgres DB related questions
jimin-genie
PROOP

2 years ago

  1. According to the doc here, when we set the Postgres DB "service" to have multiple replicas, would we have the DB operation network requests load balanced with Round Robin? Meaning potentially even the "write" operations will write to different DBs and then all replicas will eventually become sync'ed?

  2. If the answer to the above is "yes, Round Robin for writes", then will the transactions be handled as one operation by one DB instance correctly?

  3. Is there a way to have all traffic funneled to only one replica and the others become "copy" instances only?

3 Replies

brody
EMPLOYEE

2 years ago

The simple answer is, that you can't add replicas to services with volumes, aka databases.


jimin-genie
PROOP

2 years ago

Ok, so the only option we have in terms of making daily snapshots is by manually doing it ourselves with psql?


brody
EMPLOYEE

2 years ago

There exists many templates to take automated backups at any time interval, I personally recommend the one from Railway paired with Cloudflare R2 -

https://railway.app/template/I4zGrH


Loading...