Pallav Kalva pkalva
Tue Nov 9 19:11:16 PST 2004
Christopher Browne wrote:

> Pallav Kalva wrote:
>
>> Hi ,
>>
>>   I need to implement the following the replication scenario in 
>> postgres database. Here are the details of what we are looking to 
>> implement.
>>
>> Lets say I have 2 nodes Node1(US) and Node2(Canada),
>>
>> Node1: tableA , tableB
>> Node2: tableB , tableA
>>
>> tableA in Node1 is the master and it should replicate only to slave 
>> tableA in Node2
>>
>> tableB in Node2 is the master and it should replicate only to slave 
>> tableB in Node1
>>
>> Can this be possible with Slony Replication for Postgres 7.4/8.0 ?
>
>
> It certainly is possible.
>
> You could do this two ways:
>
> 1.  Create two Slony-I clusters, "canada" and "usa", which each have 
> one replication set for the single table that each wants replicated.
>
> 2.  Create one Slony-I cluster, and then have two replication sets, 1 
> and 2, one set handling the "Canada" table, and the other set handling 
> the "USA" table.
>
> Approach #2 is probably simpler to deal with...
>
Hi Chris,

   Based on your suggestion I tried to setup replication for my 
envrionment with Approach#2 and I ran into problems. To start of with 
initially, I tried to replicate on the same host with one master 
database and one slave database, I used the same expample as in docs for 
Slony replication and it went fine and I could replicate the changes and 
I could see them at the slave database immediately.
   Then I tried to do the above setup where tableA is the master in one 
node and tableB is the master in another node (in this case I used the 
same host)  and they have to replicate each other. I created 2 sets in 
the initial configuration script and added tables to each sets , when i 
run the script i get the following error :

<stdin>:44: PGRES_FATAL_ERROR select "_slony_example".storeSet(2, 'All 
testslave tables');  - ERROR:  schema "_slony_example" does not exist

  I am attaching the script and also the environment variables i used 
for the script. am I missing something  in setup configuration ?.

Thanks! again.
Pallav



-------------- next part --------------
A non-text attachment was scrubbed...
Name: slony_setup_scenario2.sh
Type: application/x-sh
Size: 2356 bytes
Desc: not available
Url : http://gborg.postgresql.org/pipermail/slony1-general/attachments/20041109/410429e1/slony_setup_scenario2.sh
-------------- next part --------------
export CLUSTERNAME=slony_example
export MASTERDBNAME=test
export SLAVEDBNAME=testslave
export MASTERHOST=localhost
export SLAVEHOST=localhost
export REPLICATIONUSER=postgres
export PGBENCHUSER=test


More information about the Slony1-general mailing list