Re: Rserv / Replication

Поиск
Список
Период
Сортировка
От Alvaro Herrera
Тема Re: Rserv / Replication
Дата
Msg-id Pine.LNX.4.33L2.0111292059320.22734-100000@aguila.protecne.cl
обсуждение исходный текст
Ответ на Rserv / Replication  (muhamad soleh fajari <fajari@solocyber.com>)
Список pgsql-general
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"


В списке pgsql-general по дате отправления:

Предыдущее
От: "Gurupartap Davis"
Дата:
Сообщение: Re: Cancelled Vacuum Leaving Tables Locked?
Следующее
От: Joseph Shraibman
Дата:
Сообщение: Re: error on drop table