Thread: Rserv / Replication

Rserv / Replication

From
muhamad soleh fajari
Date:
Hi  All,
I'm new in this milis.

I have few question for rserv replication, I hope one of you can help me
to solve my problem.
I was folow your documentation ( Howto ) in
http://techdocs.postgresql.org, but replication process not work

FYI. I'm using postgresql -7.1.2, and Redhat, master 's IP =
192.168.0.200, slave's IP = 192.168.0.6
These are  step that I used :

1. Creat database on Master and slave
2.  Initializing master database :  ./MasterInit --host=localhost
masterdb  ( I can not give  command like /MasterInit masterdb )
      * in this command, there are some optional comand that I could not
understand, for example that '--host'
          what host that I must enter, master or slave host ? . there is
no  documentation about it.
3.  The same problem is with : ./SlaveInit --host=localhost slavedb ( is
that right ? ... localhost entry I mean )
4.  And then I add table that I want to replicate ( ./MasterAddTable
masterdb table_name column_name and ./SlaveAddTable slavedb table_name
column_name )
5.  And next command is ./Replicate master slave ( as documentation ),
but it's not work, so I use command ./Replicate  master slave
--masterhost=localhost --slavehost=192.168.0.6
6. And in slave, I give command ./Replicate master slavedb
--masterhost=192.168.0.200 --slavehost=localhost

done, but not work :(

Is there any wrong step ?
or Anyone can give me information about more detail documentation ?

Thanks for your attention.





Re: Rserv / Replication

From
Alvaro Herrera
Date:
On Thu, 29 Nov 2001, muhamad soleh fajari wrote:

Hello:

> I have few question for rserv replication, I hope one of you can help me
> to solve my problem.

I don't know what has been other's people experience, but mine with
rserv has not been good. I've had lot of problems, caused by the fact
that it does not handle multicolumn primary keys. I had lots and lots of
trouble until I found out I could add a SERIAL column to those tables
and have it work right, but that messes up the model and doesn't seem
right to me. Initially, I had been suggested the use of the OID column,
but it only worked for the simplest operations. Do something a little
weird (like deleting a tuple and inserting it again) and what a mess you
have.

I also had to hack it a little to make it support multiple slaves, and
I'd liked to add support for multiple masters too, but I didn't have the
time to even think if it was possible.

Now I'm considering a migration to pgreplicator, which seems more
complete to me, but I haven't done it yet.

Well, on to rserv anyway:

> FYI. I'm using postgresql -7.1.2, and Redhat, master 's IP =
> 192.168.0.200, slave's IP = 192.168.0.6
> These are  step that I used :
>
> 1. Creat database on Master and slave
> 2.  Initializing master database :  ./MasterInit --host=localhost
> masterdb  ( I can not give  command like /MasterInit masterdb )
>       * in this command, there are some optional comand that I could not
> understand, for example that '--host'
>           what host that I must enter, master or slave host ? . there is
> no  documentation about it.

Master.

> 3.  The same problem is with : ./SlaveInit --host=localhost slavedb ( is
> that right ? ... localhost entry I mean )

Yes, the same, but that's of course executed on the slave server... you
can also do it on the master if you say

SlaveInit --host=192.168.0.6 slavedb

> 4.  And then I add table that I want to replicate ( ./MasterAddTable
> masterdb table_name column_name and ./SlaveAddTable slavedb table_name
> column_name )
> 5.  And next command is ./Replicate master slave ( as documentation ),
> but it's not work, so I use command ./Replicate  master slave
> --masterhost=localhost --slavehost=192.168.0.6
> 6. And in slave, I give command ./Replicate master slavedb
> --masterhost=192.168.0.200 --slavehost=localhost

You just execute Replicate on the master. It then connects to the slave
and does the work there. You don't have to do the 6th step.

> Is there any wrong step ?

Maybe. Is Replicate giving some error message? Try to give it --debug to
see what's going on. And see what's on __Snapshot.

> or Anyone can give me information about more detail documentation ?

There is none that I know of. If you are brave or perl profficient you
may care reading the code. It's not hard to follow.

--
Alvaro Herrera (<alvherre[@]atentus.com>)
"Uno puede defenderse de los ataques; contra los elogios se esta indefenso"