Re: Implementing Replication via pgAdmin - Mailing list pgadmin-support
From | Daniel B. Thurman |
---|---|
Subject | Re: Implementing Replication via pgAdmin |
Date | |
Msg-id | 021126B987E43D44A860139823C079110E2B72@orion.cdkkt.com Whole thread Raw |
In response to | Implementing Replication via pgAdmin ("Daniel B. Thurman" <dant@cdkkt.com>) |
Responses |
Re: Implementing Replication via pgAdmin
|
List | pgadmin-support |
Configuring Replication on Windows, using pgAdmin3 v8.0 Beta 5 ========================== On Master: ========== 1) Adding a new Master Replication Set: a) Right-click 'Replication', and select: 'New slony-I Cluster...' b) UnCheck:Join existing cluster c) Enter: Cluster name: MasterCluster d) Enter: Local node: 1: Master Node e) Enter: Adminnode: 99: pgAdmin Node f) Click: OK On Slave: ========= 2) Adding a new Slave Replication Set: a) Right-click 'Replication', and select: 'New slony-I Cluster...' b) Check: Joinexisting cluster [wait for Server dropdown list to complete] c) Click Server dropdown list and select: <Master hostname> [Cluster name is filled automatically] [Database is filled automatically] [Admin Node is filledautomatically] d) Enter: Local node for slave: 2: Slave Node e) Click: OK Adding a new Master Path/listener: a) Refresh and expand all items in the Replication tree b) Right-click 'Path (0)',under 'Master Node' and select: 'New Path' menu item [Server: '2 - Slave Node' appears] [Conn retry:'10' appears] Enter: Connect info: 'host=<slave-host> dbname=<database> user=<postgres>' Click: OK c) Click on Master Node: listens [Note that a master listener is automatically added] Adding a new Slave Path/Listeners: a) Right-click 'Path (0)', under 'Slave Node' and select: 'New Path' menu item [Server: '1 - Master Node' appears] [Conn retry: '10' appears] Enter: Connect info: 'host=<master-host> dbname=<database> user=<postgres>' Click: OK b) Click on Slave Node: listens [Note that aslave listener is automatically added] On Master: ========== 3) Completely refresh the entire 'Replication' tree and expand fully. [Should see newly added sub-trees: 'Slave Node' andpgAdmin Node] Adding a new master Path/listeners: a) Right-click 'Path (0)', under 'Master Node' and select: 'New Path' menu item [Server: '2 - Slave Node' appears] [Conn retry: '10' appears] Enter: Connect info: 'host=<slave-host> dbname=<database> user=<postgres>' Click: OK b) Click on Master Node: listens [Note that a listeneris automatically added] Adding a new slave Path/listeners: a) Right-click 'Path (0)', under 'Slave Node' and select: 'New Path' menu item [Server: '1 - Master Node' appears] [Conn retry: '10' appears] Enter: Connect info: host=<master-host> dbname=<database> user=<postgres>' Click: OK b) Click on Slave Node: listens [Note that alistener is automatically added] Adding a new Replication Set: Right-click 'Replication Sets (0)' and select: 'New Replication Set' Enter: ID: '1' Enter: Comment: 'Hardware' Click: OK Fully expand tree: 'Replication Sets (1)' Adding a new table: Right click: 'Tables (0)' and select: 'New Table' Click table dropdown list and select: <Databasetable> Enter: ID: '1' Clieck: OK Adding a new sequence: Right-click 'Sequences (0)' and select: 'New Sequence' Click 'Sequence' dropdown list item. [This step does not work for me, as I find at this point, there are no sequence dropdown items so a sequencecannot be created at this point. Otherwise if you have a sequence dropdown item, continue...] Enter:ID: '2' Click: OK Adding a new Subscription: Right-click 'Subscriptions (0)' and select: 'New Subscription' [ Origin: '1', appears] [Provider: '1 - Master Node', appears] [Reciever: '2 - Slave Node', appears (a single item)] Check: 'Can forward' [If you want this.] Click: OK [At this point, you can check to see that 'Tables (1)' and 'Subscriptions (1)' can be expanded and contains sub-treeitems so if desired, verify that your entries were properly set.] On Slave: ========= Adding a new Replication Set: Right-click 'Replication Sets (0)' and select: 'New Replication Set' Enter:ID: '1' Enter: Comment: 'Hardware' Click: OK Fully expand tree: 'Replication Sets (1)' Adding a new table: Right click: 'Tables (0)' and select: 'New Table' Click table dropdown list and select: <Databasetable> Enter: ID: '1' Clieck: OK Adding a new sequence: Right-click 'Sequences (0)' and select: 'New Sequence' Click 'Sequence' dropdown list item. [This step does not work for me, as I find at this point, there are no sequence dropdown items so a sequencecannot be created at this point. Otherwise if you have a sequence dropdown item, continue...] Enter:ID: '2' Click: OK Adding a new Subscription: Right-click 'Subscriptions (0)' and select: 'New Subscription' [ Origin: '2', appears] [Provider: '2 - Slave Node', appears] [Reciever: '1 - Master Node', appears (single item)] Check: 'Can forward' [If you want this.] Click: OK [At this point, you can check to see that 'Tables (1)' and 'Subscriptions (1)' can be expanded and contains sub-treeitems so if desired, verify that your entries were properly set.] + For both Master and Slaves, restart the services via control panel. + For pgAdmin3, stop the services and reconnect to ensure all is there. Notes/Questions: ================ 1) At this point, I think configuration is complete? What is not clear to me is the 'Sequence' in Replication Sets, shouldthere be something added there? As explained above, I am not able to do this so is this a required step? 2) Expand the Replication (1) for master and slave. I note the following: On Master: a) Master Node: Running PID='not running' b) Slave Node: Running PID='not running' On Slave: a) Master Node: Running PID='not running' b) Slave Node:Running PID='not running' I am able to manually run the slons both servers in a command window with the entries as: > slon MasterCluster dbname=MyTestuser=postgres host=copper.cdkkt.com Debugging shows no errors. When running, I show that the 'Running PID' are filled with process ID's as expected. I amable to see that replication works; updating an item on the master database table updates the slave database table. All is fine except that these slons are running as foreground processes and cannot be backgrounded and killing the commandwindow will terminate the process! How can I get the slons running without resorting to using command windows tostart the replication processes? ================= No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.487 / Virus Database: 269.13.25/1018 - Release Date: 9/19/2007 3:59 PM
pgadmin-support by date: