[Postgres-xl-general] Adding a data node with pgxc_ctl

Chan Ang Loon (I2R) chanal at i2r.a-star.edu.sg
Fri Jan 23 01:50:28 PST 2015


Hi, I tried to add a third data node to a running cluster using the pgxc_ctl utility but I find I cannot create anymore tables in the table that existed before I added the third data node. I'm trying to figure out if I missed a step or it is unexpected behavior -


-          I've set up a pgxl cluster using the pgxc_ctl utility. Initial installation done with rpm files version postgres-xl92-9.2-34.1.x86_64.rpm. I then preconfigured pgxc_ctl.conf to setup 2 coordinators and 2 datanodes. So far so good, I'm able to create databases, tables, insert, query and explain query output is as expected.

$ pgxc_ctl init all



-          I then added a third datanode and restarted my psql client. Looks good.

/usr/postgres-xl-9.2/bin/pgxc_ctl add datanode master data3 data3 5433 6668 /home/pgxl/pgxc/nodes/dn_master none


You are now connected to database "postgres" as user "pgxl".
postgres=# create database n3;
CREATE DATABASE
postgres=# \c n3
n3=# create table n3table (id int, name char(40));
CREATE TABLE
n3=# explain select * from n3table;
                                      QUERY PLAN
--------------------------------------------------------------------------------
Remote Subquery Scan on all (data,data2,data3)  (cost=0.00..14.10 rows=410 widt
h=168)
   ->  Seq Scan on n3t  (cost=0.00..14.10 rows=410 width=168)



-          But when I went back to the first database I created,

n3=# \c n2
n2=# create table n2t3 (id int, name char(40));
ERROR:  Failed to get pooled connections

n2=# select * from pgxc_node;
node_name | node_type | node_port | node_host | nodeis_primary | nodeis_preferr
ed |   node_id
-----------+-----------+-----------+-----------+----------------+---------------
---+-------------
coord     | C         |      5432 | coord     | f              | f
   |  -629959615
coord2    | C         |      5432 | coord2    | f              | f
   | -1197102633
data      | D         |      5433 | data      | f              | f
   |  -636235013
data2     | D         |      5433 | data2     | f              | f
   | -1370618993
data3     | D         |      5433 | data3     | f              | f
   | -1730198126



-          The existing table seems to be fine. (the table below was created before the 3rd datanode was added)

n2=# explain select * from n2t;
                                   QUERY PLAN
--------------------------------------------------------------------------------
Remote Subquery Scan on all (data,data2)  (cost=0.00..14.10 rows=410 width=168)
   ->  Seq Scan on n2t  (cost=0.00..14.10 rows=410 width=168)
(2 rows)

test=# select * from n2;
id |                   name
----+------------------------------------------
  1 | myname
  2 | myname
  5 | myname
  6 | myname
  8 | myname
  9 | myname
 12 | myname
 13 | myname
 15 | myname
 17 | myname
 19 | myname
  3 | myname
  4 | myname
  7 | myname
 10 | myname
 11 | myname
 14 | myname
 16 | myname
 18 | myname
 20 | myname
(20 rows)



-          I'm also able to create tables in the new database.

n2=# \c n3
n3=# create table t3a (id int, name char(40));
CREATE TABLE



-          Pls advise if I missed a step or if there's anything else I should do to diagnose?

Institute for Infocomm Research disclaimer:  "This email is confidential and may be privileged. If you are not the intended recipient, please delete it and notify us immediately. Please do not copy or use it for any purpose, or disclose its contents to any other person. Thank you."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-general-postgres-xl.org/attachments/20150123/1147c47d/attachment.htm>


More information about the postgres-xl-general mailing list