|
From: Koichi S. <koi...@gm...> - 2014-03-14 22:29:49
|
Application can connect to ANY coordinator (not datanode). So most likely is to assign different coordinator to different application instance. You can use usual -p and -h parameter for different coordinator from your applications. All the coordinator provides the same database view and any updating transaction is propagated to all the node without conflict. Regards; --- Koichi Suzuki 2014-03-14 12:11 GMT+00:00 Juned Khan <jkh...@gm...>: > Hi all, > > I have just setup postgre-xc with four servers for testing. > with this four system from GTM server i am able to connect > to database and it selects one of coordinator,. it just works fine. > > But now i want to integrate this with my application where application > is on separate server. > > so in this case where to connect in pgxc ? > > which IP and port i should set in my application to communicate with it? > > From some documentation i came to know i should connect to coordinator > but from other system i am not able connect to the database. i am getting > this > >> [postgres@localhost ~]$ psql -H 192.168.1.73 -U postgres -d dbname -p >> 20004 >> psql: warning: extra command-line argument "192.168.1.73" ignored >> psql: could not connect to server: No such file or directory >> Is the server running locally and accepting >> connections on Unix domain socket "/tmp/.s.PGSQL.20004"? > > > > But on this server seems socket port is open >> >> [root@localhost ~]# netstat -pan | grep postgre >> tcp 0 0 0.0.0.0:20004 0.0.0.0:* >> LISTEN 9454/postgres >> tcp 0 0 0.0.0.0:20008 0.0.0.0:* >> LISTEN 9522/postgres >> tcp 0 0 192.168.1.73:20008 192.168.1.73:33950 >> ESTABLISHED 10025/postgres >> tcp 0 0 192.168.1.73:33950 192.168.1.73:20008 >> ESTABLISHED 9459/postgres >> tcp 0 0 192.168.1.73:35014 192.168.1.73:20001 >> ESTABLISHED 9522/postgres >> tcp 0 0 192.168.1.73:35006 192.168.1.73:20001 >> ESTABLISHED 9454/postgres >> tcp 0 0 192.168.1.73:57794 192.168.1.43:20009 >> ESTABLISHED 9459/postgres >> tcp 0 0 :::20004 :::* >> LISTEN 9454/postgres >> tcp 0 0 :::20008 :::* >> LISTEN 9522/postgres >> udp 0 0 ::1:60142 ::1:60142 >> ESTABLISHED 9522/postgres >> udp 0 0 ::1:59683 ::1:59683 >> ESTABLISHED 9454/postgres >> unix 2 [ ACC ] STREAM LISTENING 84606 9454/postgres >> /tmp/.s.PGSQL.20004 >> unix 2 [ ACC ] STREAM LISTENING 84641 9459/postgres >> /tmp/.s.PGPOOL.20010 >> unix 2 [ ACC ] STREAM LISTENING 85268 9522/postgres >> /tmp/.s.PGSQL.20008 > > > > > am i doing correct ? > > Please suggest. > > -- > Thanks, > Juned Khan > iNextrix Technologies Pvt Ltd. > www.inextrix.com > > ------------------------------------------------------------------------------ > Learn Graph Databases - Download FREE O'Reilly Book > "Graph Databases" is the definitive new guide to graph databases and their > applications. Written by three acclaimed leaders in the field, > this first edition is now available. Download your free book today! > http://p.sf.net/sfu/13534_NeoTech > _______________________________________________ > Postgres-xc-general mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/postgres-xc-general > |