1

I have successfully installed and started postgres-xl on localhost(Ubuntu 14.04). (Two datanodes, 1 coord) The problem is: 0 rows after insert

CREATE TABLE test1 ( id bigint NOT NULL, profile bigint NOT NULL,   status integer NOT NULL, switch_date timestamp without time zone NOT NULL, CONSTRAINT test1_id_pkey PRIMARY KEY (id) ) to node (datanode1, datanode2);

 insert into test1 (id, profile, status, switch_date) select a, round(random()*10000), round(random()*4), now() - '1 year'::interval * round(random() * 40) from generate_series(1,10) a;
INSERT 0 0

select * from test1;
 id | profile | status | switch_date 
----+---------+--------+-------------
(0 rows)

And finally

SELECT pg_size_pretty(pg_database_size('test1'));
 pg_size_pretty 
----------------
 0 bytes
(1 row)

I followed the instructions (with my parameters) but there was error on creating database, and to fix it I run commands on my nodes:

  $ /usr/local/pgsql/bin/psql -p 15432 -c "CREATE NODE coord1 WITH (TYPE = 'coordinator', PORT = 35432)" postgres
  $ /usr/local/pgsql/bin/psql -p 25432 -c "CREATE NODE coord1 WITH (TYPE = 'coordinator', PORT = 35432)" postgres
  $ /usr/local/pgsql/bin/psql -p 15432 -c "select pgxc_pool_reload()" postgres
  $ /usr/local/pgsql/bin/psql -p 25432 -c "select pgxc_pool_reload()" postgres

And on coord:

SELECT pgxc_pool_reload()

After I created database, tables and DDL-commands(create table, alter table) were executed successfully,I see changes (all nodes) but now I got problems with inserting, because no errors occures but tables empty!

My configs:

~$  find /usr/local/pgsql -name *.conf -print -exec grep "5432\|666" {} \;
/usr/local/pgsql/data_coord1/pg_hba.conf
/usr/local/pgsql/data_coord1/pg_ident.conf
/usr/local/pgsql/data_coord1/postgresql.conf
port = 35432                # (change requires restart)
pooler_port = 36667         # Pool Manager TCP port
gtm_port = 6666         # Port of GTM
/usr/local/pgsql/data_gtm/gtm.conf
port = 6666             # Port number of this GTM.
/usr/local/pgsql/data_datanode1/pg_hba.conf
/usr/local/pgsql/data_datanode1/pg_ident.conf
/usr/local/pgsql/data_datanode1/postgresql.conf
port = 15432                # (change requires restart)
pooler_port = 16667         # Pool Manager TCP port
gtm_port = 6666         # Port of GTM
/usr/local/pgsql/data_datanode2/pg_hba.conf
/usr/local/pgsql/data_datanode2/pg_ident.conf
/usr/local/pgsql/data_datanode2/postgresql.conf
port = 25432                # (change requires restart)
pooler_port = 26667         # Pool Manager TCP port
gtm_port = 6666         # Port of GTM

What I am doing wrong?

P.S. no matter what kind of distribution - allways empty

) distribute by REPLICATION; ...)  distribute by HASH(id); ....) distribute by MODULO(status);

or default create table t1(id serial, k integer);

all off them empty after insert, insert always returns

INSERT 0 0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.