Обсуждение: FW: Merging databases

Поиск
Список
Период
Сортировка

FW: Merging databases

От
"Oleg Lebedev"
Дата:
I wonder what would be a good way to merge data from two databases with same desing and schemas.
We have two Postgres databases in two different countries. I would like to synch these databases on a daily basis. All the tables in our databases have primary keys defined and contain row version numbers, which would help us identify how to merge rows with the same primary key values. What would be an optimal or a typical way to do this? Can I access a remote database running Postgres 7.2.1?
thanks.
 
Oleg
 

Re: FW: Merging databases

От
Richard Huxton
Дата:
On Wednesday 21 Aug 2002 11:07 pm, Oleg Lebedev wrote:
> I wonder what would be a good way to merge data from two databases with
> same desing and schemas.

Do a search on "replication" in the mailing list archives. There are various
projects to do this at various stages of progress. See the "contrib"
directory if you have installed from source.

> What would be an optimal or a typical way to do this? Can I
> access a remote database running Postgres 7.2.1?
> thanks.

Typically with a Perl/Python client application. It either talks to both
databases simultaneously or takes responsibility for one end only. Whatever
solution you decide upon, take care with 2 things:

1. How am I handling deletion of data?
2. What happens if both sites update the same information? Is one always
right? Do individual records have owners? Does the user have to get involved?

- Richard Huxton