|
From: Ying He <yin...@ya...> - 2014-01-17 15:29:46
|
Thank you for the answers. どうもありがとうございました On Friday, January 17, 2014 1:16 AM, Koichi Suzuki <koi...@gm...> wrote: Please see inline... Good luck; --- Koichi Suzuki 2014/1/14 Ying He <yin...@ya...>: > Thank you for your response. I have a few questions: > > 1. when I use pgxc_ctl monitor command to check status, is the tool connect > to the target db and execute a query to see it is working fine or what does > it do? Yes. In the case of gtm and gtm_proxy, it opens the connection and make sure that initial shakehand works. > > 2. I did run into cases when I bring down gtm and not able to stop > gtm_proxy, coordinator, so what should be the correct order of stopping each > component if I need maintenance of a host. I will give a sample layout here > and if you could advise what should be the right order of stopping > components and restart them: > host1 has gtm master > host2 has gtm slave > host3 has gtm_proxy1, coordinator1, datanode1 > host4 has gtm_proxy2, coordinator2, datanode2 > > all tables are replicated not sharded so datanode1 and datanode2 should hold > the same copy. Let's say if I need bring down: > * host1. promote host2 as gtm master, reconnect gtm_proxy to new master. > commands like ssh gtm_slave_host gtm_ctl promote -Z gtm -D gtm_slave_dir in > the presentation, can I do it in pgxc_ctl? Yes, please see "reconnect" command in the reference. > * host2. should be ok, it is a slave gtm > * host3/host4. what is the correct order of stopping and restarting things, > assuming my app can detect down of a coordinator and connect to another > available one. You don't have to stop things in host3 and host4. You should just reconnect gtm_proxy at host3 and host4 to the new gtm master. Reconnect command of pgxc_ctl will take care of it. If you find gtm_proxy at host3 and host4 down, you can just restart them by "start" command. This time, you don't have to restart coordinators or datanodes. > > 3. for the sample layout, if host3 has power outages and down for a day and > 10G new data is in host4. what is the steps to bring it up? In present XC, you cannot do this. You should have datanode2 slave and failover datanode2 to the new master. "Failover" command will take care of this. In the case of coordinator, you can remove this by "remove" command. After a substitute hardware is available so that you can start coordinator 2, you shoudl "add" the coordinator by using "add" command. Coordinator has only system catalogs so adding the server will not take long. > > 4. for the sample layout, if I want to add host5 which has a set of > gtm_proxy3, coordinator3, datanode3, I should be able to use pgxc_ctl to add > it but if the existing datanode1 and datanode2 each holds 1Teribyte data, > will it take a really long time for it to be in synch with the rest and > start serving app, does the wait depend on how much data is already in the > existing datanodes? Yes, please refer to "add" command. The duration depends upon the size of each datanode's database cluster. Pgxc_ctl uses pg_basebackup for this purpose. > > I understand these are long and detailed questions to answer but it will > help me evaluate this tool better for serious adoption. Thank you for your > help. > > For those also wondering about any real company adoption, I find this thread > on linkedin http://www.linkedin.com/groups/Postgres-XC-77585.S.202900648, > that is the only one i find so far. > > best, > Ying > > > > > On Monday, January 13, 2014 8:51 PM, Koichi Suzuki <koi...@gm...> > wrote: > Monitoring a node status is another thing. pgxc_ctl provides a means > to check the status of each component. You should be careful to > check if GTM is alive. If it's dead, then all the query will be > blocked. I mean, before you try to check if a coordinator or a > datanode is alive, you should check if the GTM is alive. > > Regards; > --- > Koichi Suzuki > > > 2014/1/14 Michael Paquier <mic...@gm...>: >> On Tue, Jan 14, 2014 at 12:15 AM, Ying He <yin...@ya...> wrote: >>> hi, >>> >>> I am new to postgres xc. Is there a psql command that can be issued to >>> coordinator to query the current cluster's coordinators and datanodes? I >>> followed the setup steps and did CREATE NODE for coordinator and data >>> nodes >>> and they are up and running, just wonder whether a command exists that >>> can >>> query the current NODE and its status. >> You can have a look at the list of nodes registered with that: >> SELECT * FROM pgxc_node; >> Regards, >> -- >> Michael > >> >> >> ------------------------------------------------------------------------------ >> CenturyLink Cloud: The Leader in Enterprise Cloud Services. >> Learn Why More Businesses Are Choosing CenturyLink Cloud For >> Critical Workloads, Development Environments & Everything In Between. >> Get a Quote or Start a Free Trial Today. >> >> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk >> _______________________________________________ >> Postgres-xc-general mailing list >> Pos...@li... >> https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > > > |