From: Koichi S. <koi...@gm...> - 2012-02-28 23:50:30
|
To make GTM active and reconnect from Apps, you need coordinators/datanodes to connect GTM via gtm_proxy. You may need to tweak err_wait_count, err_wait_idle and err_wait_interval configuration parameters for gtm_proxy to wait for "reconnect" command form gtm_ctl. (As a default, they're all set to zro). Then, when you kill gtm, by gtm_ctl or whatsoever, you should issue "promote" command to gtm standby via gtm_ctl, such as, gtm_ctl promote -S gtm -D working_dir This makes gtm standby to run as active gtm. Next, you should tell all the gtm_proxies to reconnect to the new gtm such as gtm_ctl reconnect -S gtm_proxy -D working_dir -o "-s new_gtm_hostname -t new_gtm_port_number" They will be found in the reference manual published at http://postgres-xc.sourceforge.net/docs/0_9_7/ These procedure has not been made automatically. This is an issue of integration with HA middleware. Writing RA for specific HA middleware is regarded as separate project. I welcome efforts to write RAs (resource agents) for different HA middleware. Best Regards; ---------- Koichi Suzuki 2012/2/29 Krzysztof Nowicki <krz...@gm...>: > Hi, > > I tried a few times get reconnection to gtm standby server after gtm > active failure but unfortunately I didn't succeed. When I kill or > shutdown process of gtm active server the standby not catch traffic > and on application side I get java.sql.SQLException: No active > databases in cluster dataSource. > > For standby configuration I use only: > > nodename = 'gtm_standby' # Specifies > the node name. > port = 6666 # Port number of this GTM. > startup = STANDBY # Start mode. ACT/STANDBY. > > active_host = '10.178.228.145' # Listen address of active GTM. > active_port = 6666 # Port number of active GTM. > > Connection between GTM's seems to work: > > 815744:2012-02-28 15:40:23.510 UTC -LOG: GTM standby is active. Going > to connect. > LOCATION: gtm_standby_connect_to_standby_int, gtm_standby.c:390 > 1:140727810815744:2012-02-28 15:40:23.512 UTC -LOG: Connection > established with GTM standby. - 0x13d64b8 > LOCATION: gtm_standby_connect_to_standby_int, gtm_standby.c:405 > 1:140727766959872:2012-02-28 15:40:23.512 UTC -LOG: Sending > transaction id 136318 > LOCATION: ProcessBeginTransactionGetGXIDCommand, gtm_txn.c:1164 > 1:140727766959872:2012-02-28 15:40:23.513 UTC -LOG: calling > begin_transaction() for standby GTM 0x7ffdb40008d0. > LOCATION: ProcessBeginTransactionGetGXIDCommand, gtm_txn.c:1172 > 1:140727766959872:2012-02-28 15:40:23.513 UTC -LOG: Committing > transaction id 136318 > LOCATION: ProcessCommitTransactionCommand, gtm_txn.c:1583 > 1:140727766959872:2012-02-28 15:40:23.513 UTC -LOG: calling > commit_transaction() for standby GTM 0x7ffdb40008d0. > LOCATION: ProcessCommitTransactionCommand, gtm_txn.c:1603 > 1:140727766959872:2012-02-28 15:40:23.513 UTC -LOG: > commit_transaction() rc=0 done. > LOCATION: ProcessCommitTransactionCommand, gtm_txn.c:1615 > 1:140727766959872:2012-02-28 15:40:23.514 UTC -LOG: Cleaning up thread state > LOCATION: GTM_ThreadCleanup, gtm_thread.c:265 > 1:140727766959872:2012-02-28 15:40:23.514 UTC -LOG: Closing a > connection to the GTM standby > > Although on standby server I often get error: > > UTC -ERROR: insufficient data left in message > > Is there any tutorial how GTM Standby should be configured and how it > is working? > > Br, > > Kris Nowicki > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > Postgres-xc-developers mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-developers |