Обсуждение: table replication, without master-slave setup

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

table replication, without master-slave setup

От
Alexander Bluem
Дата:
Hello,

I have a certain setup, so that two computers are running nearly
identical databases: identical setup, tables, users and permissions,
only the contents differ. Now I'd like to keep them in sync, WITHOUT an
extra machine, hence master-slave setup. The problem is, that either one
could fail eventually. Either one or the other machine (with the same
database) get data, but not yet both at the same time. This is some sort
of load balancing.
Is there software out there that "rsyncs" database tables both ways? Or
will I have to write scripts for this task? I've already taken a look at
Slony but it is unfortunately a "master to multiple slaves". And I want
both (or maybe in future three) machines to communicate with each other.
That means one gets data, and sends it to other machines running the
same db.


Cheers,
  Alex

--

shakespeare:
/(bb|[^b]{2})/

Вложения

Re: table replication, without master-slave setup

От
"Shoaib Mir"
Дата:
You can use 'pgpool' (http://pgpool.projects.postgresql.org/) for that purpose.

Shoaib Mir
EnterpriseDB

On 7/14/06, Alexander Bluem <mailinglists1@gmx.de> wrote:
Hello,

I have a certain setup, so that two computers are running nearly
identical databases: identical setup, tables, users and permissions,
only the contents differ. Now I'd like to keep them in sync, WITHOUT an
extra machine, hence master-slave setup. The problem is, that either one
could fail eventually. Either one or the other machine (with the same
database) get data, but not yet both at the same time. This is some sort
of load balancing.
Is there software out there that "rsyncs" database tables both ways? Or
will I have to write scripts for this task? I've already taken a look at
Slony but it is unfortunately a "master to multiple slaves". And I want
both (or maybe in future three) machines to communicate with each other.
That means one gets data, and sends it to other machines running the
same db.


Cheers,
  Alex

--

shakespeare:
/(bb|[^b]{2})/



Re: table replication, without master-slave setup

От
Csaba Nagy
Дата:
Alex,

If you have 2 different sets of data, you might want to replicate both
ways in separate data bases. I mean set up on both machines 2 data
bases, one master and one slave on both machines. Then you can use 2
slony replication sets to replicate in both directions. This way if one
of the servers fail, you have both DBs on the other one.

I think you can also replicate in both directions in the same data base,
except you can't have a single table replicated both ways, you should
have each table being part of just 1 replication set. So if you have the
same tables in both application, then you should use separate data
bases.

I didn't try this with slony, but from what I have seen from how it's
set up I guess it should work.

Cheers,
Csaba.

On Fri, 2006-07-14 at 13:55, Alexander Bluem wrote:
> Hello,
>
> I have a certain setup, so that two computers are running nearly
> identical databases: identical setup, tables, users and permissions,
> only the contents differ. Now I'd like to keep them in sync, WITHOUT an
> extra machine, hence master-slave setup. The problem is, that either one
> could fail eventually. Either one or the other machine (with the same
> database) get data, but not yet both at the same time. This is some sort
> of load balancing.
> Is there software out there that "rsyncs" database tables both ways? Or
> will I have to write scripts for this task? I've already taken a look at
> Slony but it is unfortunately a "master to multiple slaves". And I want
> both (or maybe in future three) machines to communicate with each other.
> That means one gets data, and sends it to other machines running the
> same db.
>
>
> Cheers,
>   Alex