Skip site navigation (1) Skip section navigation (2)

Re: Replicating only a particular database - Londiste, or Bucardo

From: lalit(at)avendasys(dot)com
To: "Greg Sabino Mullane" <greg(at)endpoint(dot)com>
Cc: pgsql-cluster-hackers(at)postgresql(dot)org
Subject: Re: Replicating only a particular database - Londiste, or Bucardo
Date: 2011-03-17 02:18:06
Message-ID: 1300328286.38044392@192.168.4.58 (view raw or flat)
Thread:
Lists: pgsql-cluster-hackers
Hi,

Thanks for the reply, please see my responses inline

>> We have scripts for Add, Drop, Promote and Reset(a single
>> node when it fails/we want to join it back)
>> 
>> So my scripts have to be modified for the new replication model, 
>> but will I be able to achieve all the above with Londiste, or 
>> Bucardo. Or else, is there any better thing which somebody is 
>> already using with a model like this ?

> It's still not entirely clear what your model is. If you have a 
> database that needs to be replicated, why not put it in its own 
> cluster and use PG9? Is all of this only for read-only load 
> balancing? Under what conditions would a slave become a master

Our model is like this - my server appplication goes in as an network
appliance, where I use postgres for DB and multiple such boxes can be
joined to form a cluster. In each node there are two databases
 - a config db(which should get replicated in a cluster setup) and
a sessions db(which is local and not replicated). When we setup
a cluster, the Publisher has r+w on config db, and the Subsriber
nodes are read-only slaves for config db. A Subscriber node can
be promoted to a Publisher(say when the original Publisher goes
down). this does not need to happen by itself(not failover),
but it is a separate cluster operations that we have which sys
admins have to use manually - and it does not matter if Publisher
is down or not.

>> - if a node is not replicated for sometime(6 hours for Slony-I) 
>> it is dropped from the cluster

> You mean if it is not reachable at all? That will not work well 
> with Bucardo. By "cluster" do you mean the group of slaves?

yeah i did mean if the node is not reachable, and it has not replicated
since last N hours. There is a cluster_servers table which has a
last_replication col updated by a Slony-I hook and there is a cron
(on the Publisher) that runs and checks this col, if the the
replication delay is more than 6 hours, it drops the node from the
cluster, which is the master+slave nodes

> Londiste is pretty much the same as Slony as far as most of these 
> questions. All can do this as well, although the Bucardo way is 
> quite different

I am more familiar with python so bit of of inclined towards taking a
look at the Londiste approach, add/drop operations are fine, but my
main concern is the promote case - as i expect there can be some data
loss, but wanted to know will Londiste/Bucardo make sure that that is
the least.

In Londiste, I see they use a ticker on the Provider, does it mean
that after every tick the data should have been pushed to all the
slave nodes ?

Thanks,
Lalit


In response to

pgsql-cluster-hackers by date

Next:From: Josh BerkusDate: 2011-04-01 17:38:11
Subject: Reminder: cluster-hackers meeting at pgCon
Previous:From: Greg Sabino MullaneDate: 2011-03-17 01:22:07
Subject: Re: Replicating only a particular database - Londiste, or Bucardo

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group