I have a client that really (really, REALLY!) wants to use a standard database server through a specific hosting company. That company offers vanilla installs of PostgreSQl and MySQL only.

The client has several running instances of web application software. They want those applications to be able to share a certain portion of their data.

That data is kept in a small handful of tables on each instance's database.

I immediately thought of some type of data replication or synchronization. Master-Slave or Master-Master replication would work fine. MySQL federation would probably work too.

But the problem comes back again to the hosting company. We won't have superuser access on the OS or the DB server, nor will we be able to modify the DB server's configuration files.

Question: Without superuser access or access to the DB server's configuration files, is it possible to set up some type of data synchronization?

Everything I've read so far suggests that this is impossible. But, perhaps there's a method I've overlooked?

Note: If it helps, each app's database will be hosted on the same DB server.

  • 1
    You can use trigger-based replication, but you will have to roll your own. postgresql.org/docs/9.0/static/… – Jack Douglas Mar 29 '17 at 8:02
  • I saw something like that here: dba.stackexchange.com/questions/17389/keeping-2-tables-in-sync That question was specifically about MySQL, and it required modifying the config file. Would PostgreSQL require altering the config files? – ABeard89 Mar 29 '17 at 8:12
  • Are you able to CREATE EXTENSION for postgres_fdw? If not, are you able to create a dblink between the master and the slave? No need to change config files to add triggers of course. – Jack Douglas Mar 29 '17 at 9:54
  • 1
    This is all theoretical so far. We don't have an actual server set up, so I don't know the specific privileges the user would have. I don't even know if the user would have trigger permissions. However, if I'm gonna be able to do this, it seems triggers will be the way to go. I'll be doing some heavy research into it. Thanks for the tip! – ABeard89 Mar 29 '17 at 11:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.