pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedReplication Options.
3+ messages / 2 participants
[nested] [flat]
* Replication Options.
@ 2004-10-29 15:28 Pallav Kalva <pkalva@deg.cc>
0 siblings, 1 reply; 3+ messages in thread
From: Pallav Kalva @ 2004-10-29 15:28 UTC (permalink / raw)
To: pgsql-admin
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 any of the replication models available for
Postgres 7.4/8.0 ?
Thanks!
Pallav
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Replication Options.
@ 2004-10-29 20:50 Chris Browne <cbbrowne@acm.org>
parent: Pallav Kalva <pkalva@deg.cc>
0 siblings, 1 reply; 3+ messages in thread
From: Chris Browne @ 2004-10-29 20:50 UTC (permalink / raw)
To: pgsql-admin
pkalva@deg.cc (Pallav Kalva) writes:
> 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 any of the replication models available for
> Postgres 7.4/8.0 ?
This scenario would be supported by Slony-I; there are several ways to
accomplish it, probably the easiest being thus...
- Create two nodes, 1 and 2
- Create two replication sets - #1 and #2.
- Set 1 has origin of node 1
- Set 2 has origin of node 2
- Add tablea to set 1
- Add tableb to set 2
- Subscribe node 2 to set 1
- Subscribe node 1 to set 2
Either node can run PG 7.4 or 8.0...
--
let name="cbbrowne" and tld="cbbrowne.com" in String.concat "@" [name;tld];;
http://slony.info
A VAX is virtually a computer, but not quite.
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: Replication Options.
@ 2004-11-09 14:37 Pallav Kalva <pkalva@deg.cc>
parent: Chris Browne <cbbrowne@acm.org>
0 siblings, 0 replies; 3+ messages in thread
From: Pallav Kalva @ 2004-11-09 14:37 UTC (permalink / raw)
To: Chris Browne <cbbrowne@acm.org>; +Cc: pgsql-admin
Chris Browne wrote:
>pkalva@deg.cc (Pallav Kalva) writes:
>
>
>> 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 any of the replication models available for
>>Postgres 7.4/8.0 ?
>>
>>
>
>This scenario would be supported by Slony-I; there are several ways to
>accomplish it, probably the easiest being thus...
>
>- Create two nodes, 1 and 2
>
>- Create two replication sets - #1 and #2.
>
> - Set 1 has origin of node 1
> - Set 2 has origin of node 2
>
> - Add tablea to set 1
> - Add tableb to set 2
>
> - Subscribe node 2 to set 1
> - Subscribe node 1 to set 2
>
>Either node can run PG 7.4 or 8.0...
>
>
Hi Chris,
Based on your suggestion I tried to setup replication for my
envrionment 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 or this
type of configuration is not possible with Slony.
Thanks! again.
Pallav
Attachments:
slony_setup_scenario2.sh (application/x-sh, 2.3K) download
slony_env_variables (text/plain, 197B) download
export CLUSTERNAME=slony_example
export MASTERDBNAME=test
export SLAVEDBNAME=testslave
export MASTERHOST=localhost
export SLAVEHOST=localhost
export REPLICATIONUSER=postgres
export PGBENCHUSER=test
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2004-11-09 14:37 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-10-29 15:28 Replication Options. Pallav Kalva <pkalva@deg.cc>
2004-10-29 20:50 ` Chris Browne <cbbrowne@acm.org>
2004-11-09 14:37 ` Pallav Kalva <pkalva@deg.cc>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox