Обсуждение: Mirror databases

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

Mirror databases

От
Leandro Fanzone
Дата:
I have a collection of databases that are meant to be equal in an array
of PCs. Specifically, it is about POS stations: each POS has exactly the
same tables of articles, cashiers, etc. They are meant to work in a
standalone fashion, so I can't afford the idea of all clients and one
server, and each one has to be client and server at the same time. If
the network has problems, the whole supermarket must operate in spite of
that.
So, if I have one PC that I will call "master", is there any native
mechanism in Postgre to duplicate automagically those tables to the rest
of the "slaves"? If I need to update them all, it would be enough to
update this master and tell the rest to "copy" the database from that
one. I wouldn't need to worry about the state of each box, and assume
that Postgre does it all for me, knowing what it needs to update in each
case.
Excuse me if my language is novice, but I am not very learnt in this
field.
Thank you in advance,

Leandro Fanzone.


Re: Mirror databases

От
"Brett W. McCoy"
Дата:
On Thu, 6 Dec 2001, Leandro Fanzone wrote:

> I have a collection of databases that are meant to be equal in an array
> of PCs. Specifically, it is about POS stations: each POS has exactly the
> same tables of articles, cashiers, etc. They are meant to work in a
> standalone fashion, so I can't afford the idea of all clients and one
> server, and each one has to be client and server at the same time. If
> the network has problems, the whole supermarket must operate in spite of
> that.
> So, if I have one PC that I will call "master", is there any native
> mechanism in Postgre to duplicate automagically those tables to the rest
> of the "slaves"? If I need to update them all, it would be enough to
> update this master and tell the rest to "copy" the database from that
> one. I wouldn't need to worry about the state of each box, and assume
> that Postgre does it all for me, knowing what it needs to update in each
> case.

You are doing what is known as 'replication'.  This is, according to the
PostgreSQL website, something that is still under development.  However,
you should take a look at this page:

http://gborg.postgresql.org/project/pgreplication/projdisplay.php

-- Brett
                                          http://www.chapelperilous.net/
------------------------------------------------------------------------
It is a hard matter, my fellow citizens, to argue with the belly,
since it has no ears.
        -- Marcus Porcius Cato