Synch DB Tables - local to cloud, postgres

I have a Web2 app Im working on locally with postgres and I have it also set up on xojocloud. How are people updating DB content from local to cloud as you are developing? I have been using DBeaver to backup/restore from the local db to the cloud and that works fine but…anyone have a nicer way of doing it?

PostgreSQL has two features for this. One is logical replication and the other is streaming replication. We’ve been using it for years and it works very well. Primarily, we use streaming replication where we have a second server that replicates all data from the master. I don’t think you can do that with Xojo Cloud since you need a dedicated PostgreSQL database that you can setup.

Maybe Xojo Cloud supports logical replication. With this type, it is a little more flexible. You can replicate only specific databases or tables. You can make all of the “writes” to your local postgreSQL database and your remote postgreSQL will automatically replicate it. It can be a bit of a pain to setup, but once you figure it out, it is fairly simple and very reliable.

2 Likes

Thanks Brandon, I will start reading on that. It sounds very promising! The Postgres on xojo loud is a full dedicated db and seems fully configurable

what about simply duplicating the database schema inside the same database ?
the users use the “maindatabase” schema
and the dev uses the “debugdatabase” schema.
then you only have to clone the main to the debug once in a while
also make an automated backup of schema that you can restore in case of a crash on the main database ?