[Postgres-xl-general] Adding a data node with pgxc_ctl
Mason Sharp
msharp at translattice.com
Fri Jan 30 11:53:02 PST 2015
On Fri, Jan 30, 2015 at 6:03 AM, Chan Ang Loon (I2R) <
chanal at i2r.a-star.edu.sg> wrote:
> Hi,
>
>
>
> Thanks for the tip – this is what I’ve done over my existing setup
>
>
>
>
>
> - Built a new version of pgxc_ctl
>
> - Deleted all coordinator and datanode working directories
>
> - Restarted GTM and reinit – my pgxc_ctl.conf file has 2
> coordinators and 1 datanode
>
>
>
> [pgxl at node2 ~]$ /usr/local/pgsql/bin/pgxc_ctl init all
>
>
>
> - Create database
>
>
>
> postgres=# create database n1;
>
> CREATE DATABASE
>
> postgres=# \c n1
>
> You are now connected to database "n1" as user "pgxl".
>
> n1=# create table t1 (id int);
>
> CREATE TABLE
>
> n1=# select * from pgxc_node;
>
> node_name | node_type | node_port | node_host | nodeis_primary |
> nodeis_preferred | node_id
>
>
> -----------+-----------+-----------+-----------+----------------+---------------
>
> ---+-------------
>
> coord | C | 5432 | coord | f |
> f
>
> | -629959615
>
> coord2 | C | 5432 | coord2 | f |
> f
>
> | -1197102633
>
> data | D | 5433 | data | f |
> f
>
> | -636235013
>
>
>
>
>
> - Add new data node
>
>
>
> /usr/local/pgsql/bin/pgxc_ctl add datanode master data2 data2 5433 6668
> /home/pgxl/pgxc/nodes/dn_master none none none
>
>
>
>
>
> - New psql session with the pooled connections error. I’ve also
> put in some extra tests since some things work and others don’t.
>
>
>
>
>
> [pgxl at node2 nodes]$ psql
>
> psql (PGXL 9.2.0, based on PG 9.2.4 (Postgres-XL 9.2.0))
>
> Type "help" for help.
>
>
>
> postgres=# \c n1
>
> You are now connected to database "n1" as user "pgxl".
>
>
>
> n1=# create table t2 (id int);
>
> ERROR: Failed to get pooled connections
>
>
>
> n1=# explain select * from t1;
>
> QUERY PLAN
>
> --------------------------------------------------------------------------
>
> Remote Subquery Scan on all (data) (cost=0.00..34.00 rows=2400 width=4)
>
> -> Seq Scan on t1 (cost=0.00..34.00 rows=2400 width=4)
>
>
>
>
>
> n1=# select * from pgxc_node;
>
> node_name | node_type | node_port | node_host | nodeis_primary |
> nodeis_preferred | 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
>
>
>
>
>
> - This looks strange to me
>
>
>
> n1=# create database n2;
>
> ERROR: Failed to get pooled connections
>
> n1=# \c postgres;
>
> You are now connected to database "postgres" as user "pgxl".
>
> postgres=# create database n2;
>
> CREATE DATABASE
>
Since it later worked on retry, there is probably some bug with setting up
connection pools.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.postgres-xl.org/private.cgi/postgres-xl-general-postgres-xl.org/attachments/20150130/e3f4acdc/attachment.htm>
More information about the postgres-xl-general
mailing list