Re: Implementing Replication via pgAdmin

Поиск
Список
Период
Сортировка
От Daniel B. Thurman
Тема Re: Implementing Replication via pgAdmin
Дата
Msg-id 021126B987E43D44A860139823C079110E2B6B@orion.cdkkt.com
обсуждение исходный текст
Ответ на Implementing Replication via pgAdmin  ("Daniel B. Thurman" <dant@cdkkt.com>)
Список pgadmin-support
I have gone over the following document:
http://www.slony.info/documentation/firstdb.html

To get some idea of what is going on (at the manual level)
as to how replication services works.  From what I have done,
was to manually start the slon for the master and server sides
the following:

MASTER:
1) Set the privileges for the MyTest database so as to allow  postgres user to access the table completely (ALL)
2) In the windows command window:  a) set path variable to include the path to postgreSQL/bin  b) set PGUSER=postgre
c)set PGPASSWORD=*****  d) 
slon Copper-Master-Cluster dbname=MyTest user=postgres host=copper.cdkkt.com
<a gadzillion debug messages are shown. Make sure there are no errors reported>
[I found initially tho, that slon complained that myTest did not exist, and Ifound that my entries in BOTH of server
sidesin the Replication tree containeda couple of dbname=myTest when they should have been dbname=MyTest (I did notknow
theywere case sensitive), so I updated the entries via pgAdmin interfaceto proper values, then retried slon again, and
theerrors disappeared!] 

SLAVE:
1) Set the privileges for the MyTest database so as to allow  postgres user to access the table completely (ALL)
2) In the windows command window:  a) set path variable to include the path to postgreSQL/bin  b) set PGUSER=postgre
c)set PGPASSWORD=*****  d) 
slon Copper-Master-Cluster dbname=MyTest user=postgres host=raider.cdkkt.com
<a gadzillion debug messages are shown.  Make sure there are no errors reported>
[I found an error reported for "duplicate key" violation on sl_table_tab_reliod_keyand I compared the value of 18989
againstthat of the master side and the valuethere was found to be: 18988.  So I updated the slave side value to 18988
tomatch,updated the table, and the error disappeared and replication went on smoothly!] 

I found that, if PGPASSWORD was not supplied, the connection will fail since slon
could not find the password, even if I provided the .pgpass file with the correct
information.

I had tested replication by changing a value in one of the columns in the MyTest.car
table and lo' and behold!  The slave server's MyTest table was updated!  For fun, I
also tried the converse, to change a value in the slave side table and the master car
table was not updated (as expected).

Now... here comes the hard part...

How to I put this slon replication service "into the background" on windows or
more to the point, how do I normally start the replication process normally (as
a service?) and not manually as I have done in the above steps?

I noticed that if I tried to "start" the replication via pgAdmin3 w/o having the
slon programs running by selecting: "Restart Node" menu item when slon replication
programs are not running on either the master or slaves, it would simply pop up an
error message saying that the replication services are not 'running'.  Shouldn't
there be some sort of a 'Start Node', 'Stop Node' type of menu item or what?

Again, what is the proper way to start the replication service w/o having to open
a command window and manually start it in the manner as I have done above?

Thanks!
Dan

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.487 / Virus Database: 269.13.22/1013 - Release Date: 9/17/2007 1:29 PM


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

Предыдущее
От: Dave Page
Дата:
Сообщение: Re: pgAdmin3, v1.8.0 BETA-5
Следующее
От: "Hiroshi Saito"
Дата:
Сообщение: Re: pgAdmin3, v1.8.0 BETA-5