Consider a scenario where I have 3 standalone running Postgres engines that are installed on three separate machines.

The data on this machine is inserted, updated or removed each month by employees. Changes made to the database must be sent and integrated into a master engine by the means of a usb drive (all the work is done offline).

One way is to always copy all the data from the 3 machines each month and then copy them to the master machine. Is there a more practical solution or technology to that on Postgres?

  • You can either use BDR 2ndquadrant.com/en/resources/bdr or use Postgres-XL to distribute your data over multiple nodes – a_horse_with_no_name Aug 15 '15 at 12:15
  • Is the data from the master then send back to all 3 standalone Postgres engines? – Marco Aug 15 '15 at 17:11
  • XL won't do any good since it's offline access, and BDR needs all nodes online for DDL. Neither is suitable for uses where one or more nodes are offline most of the time. – Craig Ringer Aug 16 '15 at 7:24
  • So each of the three have their own particular data? And each reports its own data to the 4th computer, the master, the sum of the other three? Also, by "offline" do you mean none of these 4 machines are networked? – Basil Bourque Aug 16 '15 at 15:37
  • yes each of this machine has their own particular data .none of this 4 machine is connectod, no data will be send back to the 3 slave machine , – bob-cac Aug 17 '15 at 7:45

Try the dblink. You find the description in http://www.postgresql.org/docs/current/static/contrib-dblink-function.html and http://www.postgresonline.com/journal/archives/44-Using-DbLink-to-access-other-PostgreSQL-Databases-and-Servers.html. Also a question about dblink was asked on https://stackoverflow.com/questions/3862648/how-to-use-install-dblink-in-postgresql.

  • 1
    How will dblink do any good whatsoever when the other machine is offline and only accessed by a USB key? – Craig Ringer Aug 16 '15 at 7:24
  • You are right that a dblink will not work at that moment. This was not really clear in the question. The offline can also mean that during the processing of the data from the other machines nothing can access the database. – Marco Aug 16 '15 at 18:26
  • yes the data can be copied (using the command copy) or backup and then transferred to the master by usb. – bob-cac Aug 17 '15 at 7:47

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.