Re: Implementing Replication via pgAdmin

Поиск
Список
Период
Сортировка
От Daniel B. Thurman
Тема Re: Implementing Replication via pgAdmin
Дата
Msg-id 021126B987E43D44A860139823C079110E2B65@orion.cdkkt.com
обсуждение исходный текст
Ответ на Implementing Replication via pgAdmin  ("Daniel B. Thurman" <dant@cdkkt.com>)
Ответы Re: Implementing Replication via pgAdmin  (Dave Page <dpage@postgresql.org>)
Список pgadmin-support
>> Thanks Dave.
>>
>> But I am having some trouble trying to get replication to work.
>>
>> Here is what I did:
>>
>> 1) On master server:
>>    a) I registered: lib/slevent.dll
>>    b) I register as a service: slon -regservice
>>    c) slon -listengines
>>       2 engine(s) registered for service 'Slony-I'
>>       Engine 1: E:\Program Files\PostgreSQL\8.2\data\slon.conf
>>       Engine 2: E:\Program Files\PostgreSQL\8.2\data\master.conf
>>    d) Started the slon service via manage->services
>>
>> 2) On Slave Server
>>    a) I registered: lib/slevent.dll
>>    b) I register as a service: slon -regservice
>>    c) slon -listengines
>>       2 engine(s) registered for service 'Slony-I'
>>       Engine 1: E:\Program Files\PostgreSQL\8.2\data\slon.conf
>>       Engine 2: E:\Program Files\PostgreSQL\8.2\data\slave.conf
>>    d) Started the slon service via manage->services
>
>Why did you register 2 engines on each? For a simple master-slave setup
>you would only need one engine for the master and one for the slave.
>

Because I did not know what I was doing. FYI: For the master and the slave
the configuration is taken directly from the slon-sample.conf CVS area and
I made no changes to it.  It turns out that the master.conf and slave.conf
was perhaps for an old version and caused errors to the slon service on the
slave and thus removing slave.conf from the service reported no more errors.
The error reported was that the service was not able to connect to the local
database, fwiw.

I am assuming that there is nothing needed to be changed to the config file
(all of the entries are commented out by default).  Restarting both the master
and slave service reports no errors at this time.

>> 3) Launched: pgAdmin3 (v1.6.2)
>
>You might want to try 1.8 beta 5. There have been some useful
>improvements to the Slony code.
>
>>    a) Created Master Server Connection
>>    b) Selected database: MyTest
>>    c) Right-clicked Replication object, selected from menu:
>New slony-I Cluster ...
>>    d) Join existsing cluster: [unchecked]
>>       Server: <Master-Server-Name> [Greyed out]
>>       Database: MyTest [Entered data]
>>       Cluster Name: <Master-HostName>-Master-Cluster [entered data]
>>       Local Node: 1,  Value: "Master Node" [entered data]
>>       Admin Node: 99, Value: "pgAdmin Node" [entered data]
>>       Comment: <empty> [no data entered]
>>    d) Clicked OK and Completed structure shows:
>>       <Master Hostname>-Master-Cluster
>>         Nodes (2)
>>           Master Node
>>             Paths (0)
>>             listens (0)
>>           pgAdmin Node
>>             Paths (1)
>>               Master Node
>>             listens (1)
>>               Master Node (Master Node)
>>         Replication Sets (0)
>
>OK.
>
>>     At this point, I tried to add a slave node but was unable to:
>>     a) I tried (on Master server) connection:
>
>Setup the slave on the slave, not the master.
>
>>
>>     b) Then I tried (on Slave Server) connection:
>>       1) Right-clicked Replication object, selected from
>menu: New slony-I Cluster ...
>>       2) Join existing cluster: [checked]
>>          Server: <Slave-Server-Name> [Initially was Greyed
>out, but active after a delay]
>>          Database: MyTest [unchanged]
>>          Cluster Name: <empty> [dropdown shows empty list
>and not selecteable]
>>          Local Node: <empty>, Value: <empty>
>>          Admin Node: <empty>, Value: <empty>
>>          Comment: <empty>
>>
>>       At this point, it makes no sense to enter any fields
>after 'Cluster Name' since
>>       the 'Cluster Name' must have a value and 'OK' remains
>greyed out.
>

Oh bust my knuckles.  NOW I understand what is going on!  I did
not realize that I needed to change the Server: <Slave-Server-name>
dropdown to that of the MASTER-SERVER-NAME for which I wanted to add
my slave DB to.  Uh, duhoh!

Now I am able to join the slave to the master cluster.

>
>Yeah, iirc that could happen on earlier versions of pgAdmin. Install a
>copy of 1.8 beta 5 (it'll install alongside your current copy) and try
>that. It should work more as you would expect.
>
>Regards, Dave.

But uh, there is still another problems for me...

I changed an entry in the myTest database table and I do not see this value
replicated to the slave db.  Is there something more I need to do after coming
this far along?

So far I see:
      On Master Server:      <Master Hostname>-Master-Cluster        Nodes (3)          Master Node            Paths
(0)           listens (0)          Slave Node            Paths (0)            listens (0)          pgAdmin Node
  Paths (2)              Master Node              Slave Node            listens (2)              Master Node (Master
Node)             Slave Node (Slave Node)        Replication Sets (0) 
      On Slave Server:      <Slave Hostname>-Master-Cluster        Nodes (3)          Master Node            Paths (0)
         listens (0)          Slave Node            Paths (0)            listens (0)          pgAdmin Node
Paths(1)              Master Node            listens (1)              Master Node (Master Node)        Replication Sets
(0)
 I am not sure where to look for any activities...

Thanks!

No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.487 / Virus Database: 269.13.21/1012 - Release Date: 9/16/2007 6:32 PM


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

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