|
From: Michael P. <mic...@gm...> - 2012-09-19 01:29:53
|
On Wed, Sep 19, 2012 at 10:12 AM, Shavais Zarathustra <sh...@gm...>wrote: > Hello, > > I've been using a computer on which gmail was already logged in. I > mistakenly assumed it was logged into my account. Sorry about that. > Don't worry :) > > The pgxc_node_name setting was set to 'coord1' and 'datanode1' in > data_coord1/postgresql.conf and data_datanode1/postgersql.conf, > respectively. > OK, nice. > > I reinitialized the install, as you suggested (except I just shut > everything down, blew away the data_* folders in /usr/local/pgsql, and > reused those instead of using $HOME/pgsql/data_*), and, so far, that seems > to have fixed the problem. (I guess probably those data_* folders should > be under /var somewhere..) > > I'm not sure what the problem was. I think I recall having attempted to > issue a sql command to create a coordinator node, the previous time around. > I notice your steps don't include that step? I wonder if somehow that > affected things? > When you initialized a node with initdb, --nodename is a mandatory option. This option value is used to set up pgxc_node_name automatically and initialize the catalog pgxc_node with the data of the node itself. You need to create a Coordinator with CREATE NODE on a Coordinator only if there is at least 2 Coordinators in your cluster. > The reason I had set the port in datanode1's postgresql.conf was because I > would like to use gtm_ctl and pg_ctl to start up and shutdown, using an > init.d script, (ala service postgresql-xc start / restart / stop) and I > haven't been able to get pg_ctl to pass the port parameter to postgres. > (pg_ctl ... -o -p 15432 doesn't work; apparently I'm misinterpreting the > usage docs). After putting that setting back in again, I'm using gtm_ctl > and pg_ctl to start and stop it all at this point, and it seems to working > fine. > Nice to hear that it is working. I am sure you missed something at initialization. When you want to add a port number with pg_ctl, be sure to use quotes with -o, like: -o "-p $PORT" The XC documentation is not perfect, if you could point to the page and the paragraph where you had doubts I can try to have a look and correct the doc if necessary. > The pgbench utility wasn't installed, but I finally found it and installed > it. I notice that it somehow left a bunch of idle connection processes > behind after exiting. Would those get reused, or is that a problem with > pgbench? (I restarted postgres-xc and they went away, but. Just > wondering.) > The connection pooling of XC is made to maintain connections between nodes as it consumes a bunch of ressources to create connections on the fly for each transaction. You can however drop those connections with CLEAN CONNECTION, command specific to XC: http://postgres-xc.sourceforge.net/docs/1_0/sql-cleanconnection.html -- Michael Paquier http://michael.otacoo.com |