![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi. Is there a way to synchronize specific tables across different databases? |
#3
| |||
| |||
|
|
Hi. Is there a way to synchronize specific tables across different databases? My specific problem: I use an accounting application at two sites (lx-office, a german fork of sql-ledger). Although the accounting is different at both sites, the master data for products and vendors should contain the same items. This kind of database grows slowly as news products are entered via the accounting application. Now I'd hate to enter every bit of master information twice. So I am looking for some tool that can keep these specific tables in unison. Any hint? ---<(kaimartin)>--- |
#4
| |||
| |||
|
|
Is there a way to synchronize specific tables across different databases? My specific problem: I use an accounting application at two sites (lx-office, a german fork of sql-ledger). Although the accounting is different at both sites, the master data for products and vendors should contain the same items. This kind of database grows slowly as news products are entered via the accounting application. Now I'd hate to enter every bit of master information twice. So I am looking for some tool that can keep these specific tables in unison. |
#5
| |||
| |||
|
|
Not sure what you mean by: specific tables across different but similar databases |
|
But pgpool might be what you're looking for http://pgfoundry.org/projects/pgpool/ |
#6
| |||
| |||
|
|
Are the tables modified in one database and should be "replicated" to the other database? If yes, what delay is acceptable? |
|
Or are the data generated somewhere else and then imported into the databases? Apart from the tools already suggested, there is also dblink in the contribs with which you can access one database from the other. |
|
You can consider triggers that use dblink to propagate the information. |
#7
| |||
| |||
|
|
Is there a way to synchronize specific tables across different databases? Its low tech but how about a script and a cronjob? |
#8
| |||
| |||
|
|
Are the tables modified in one database and should be "replicated" to the other database? If yes, what delay is acceptable? Whatever. Currently, I am the only user on both systems. So there is no danger of race conditions. Having the tables synchronized once a week would be fine for me. |
|
You can consider triggers that use dblink to propagate the information. Being a newbie at postgres administration my next question would ask for information how to "propagate the information"... |
|
At the moment, I consider a more hands on route: Dump the tables on both databases do a diff, decide manually how to deal with conflicting lines and rebuild the tables on the databases. |
#9
| |||
| |||
|
|
To export table "schema.table", you can use pg_dump similar to this: [...] |
#10
| |||
| |||
|
|
pg_dump --data-only --file=exportfile --table=schema.table -U dbuser masterdb ^^^^^^^^^^^^ |
![]() |
| Thread Tools | |
| Display Modes | |
| |