From anandbabu.vv at cyrusxp.com Mon Nov 19 08:55:23 2018 From: anandbabu.vv at cyrusxp.com (Anandbabu Vv) Date: Mon, 19 Nov 2018 22:25:23 +0530 Subject: [Postgres-xl-developers] Migrating from Postgres9.6 to Postgres-XL1-R1 for distributed table Message-ID: Hello Team, I was facing following errors on data import, I have used both Roundrobin type and Hash, example table structure as below, is there any simplest way to achieve sharing? CREATE TABLE foos ( id bigserial NOT NULL, project_id integer NOT NULL, template_id integer NOT NULL, batch_id integer, dataset_id integer NOT NULL, name text NOT NULL, CONSTRAINT pk_foos PRIMARY KEY (id), CONSTRAINT fk_foos_batch_id FOREIGN KEY (batch_id) REFERENCES batches (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_dataset_id FOREIGN KEY (dataset_id) REFERENCES datasets (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_project_id FOREIGN KEY (project_id) REFERENCES projects (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_template_id FOREIGN KEY (template_id) REFERENCES templates (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT uc_foos UNIQUE (project_id, name) ); ERROR: Hash/Modulo distribution column does not refer to hash/modulo distribution column in referenced table. ERROR: Cannot locally enforce a unique index on round robin distributed table. ERROR: Unique index of distributed table must contain the hash distribution column . Thankyou, Anandbabu.V.V Sr.SystemAdministrator Cyrus-XP Inc (cyrusxp.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: From anandbabu.vv at cyrusxp.com Mon Nov 19 08:55:23 2018 From: anandbabu.vv at cyrusxp.com (Anandbabu Vv) Date: Mon, 19 Nov 2018 22:25:23 +0530 Subject: [Postgres-xl-developers] Migrating from Postgres9.6 to Postgres-XL1-R1 for distributed table Message-ID: Hello Team, I was facing following errors on data import, I have used both Roundrobin type and Hash, example table structure as below, is there any simplest way to achieve sharing? CREATE TABLE foos ( id bigserial NOT NULL, project_id integer NOT NULL, template_id integer NOT NULL, batch_id integer, dataset_id integer NOT NULL, name text NOT NULL, CONSTRAINT pk_foos PRIMARY KEY (id), CONSTRAINT fk_foos_batch_id FOREIGN KEY (batch_id) REFERENCES batches (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_dataset_id FOREIGN KEY (dataset_id) REFERENCES datasets (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_project_id FOREIGN KEY (project_id) REFERENCES projects (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT fk_foos_template_id FOREIGN KEY (template_id) REFERENCES templates (id) MATCH SIMPLE ON UPDATE NO ACTION ON DELETE CASCADE, CONSTRAINT uc_foos UNIQUE (project_id, name) ); ERROR: Hash/Modulo distribution column does not refer to hash/modulo distribution column in referenced table. ERROR: Cannot locally enforce a unique index on round robin distributed table. ERROR: Unique index of distributed table must contain the hash distribution column . Thankyou, Anandbabu.V.V Sr.SystemAdministrator Cyrus-XP Inc (cyrusxp.com) -------------- next part -------------- An HTML attachment was scrubbed... URL: