Giter VIP home page Giter VIP logo

Comments (5)

lkral-navmatix avatar lkral-navmatix commented on July 22, 2024 1

Okay, so we can trigger on our clusters with just this:

START TRANSACTION;

CREATE TABLE public.table2 (
	id int8 GENERATED ALWAYS AS IDENTITY NOT NULL,
	CONSTRAINT table2_pk PRIMARY KEY (id)
);
SELECT create_reference_table('public.table2');

CREATE TABLE public.table1 (
	id int8 GENERATED ALWAYS AS IDENTITY NOT NULL,
	table2_id int8 NOT NULL,
	column0 int2 NOT NULL,
	column1 timestamptz NOT NULL,
	column2 int2 NOT NULL,
	column3 int2,
	column4 int8,
	column5 int8,
	column6 int8,
	CONSTRAINT table1_pk PRIMARY KEY (id,table2_id),
	CONSTRAINT table1_table2_fk FOREIGN KEY (table2_id) REFERENCES public.table2(id)
);
SELECT create_distributed_table('public.table1', 'table2_id');

COMMIT;

from citus.

lkral-navmatix avatar lkral-navmatix commented on July 22, 2024

We have recreated one of the clusters with only one worker to test if the issue persists and we keep encountering it even in 1 coordinator + 1 worker setup.

Using bigserial seems to work as a workaround.

from citus.

JelteF avatar JelteF commented on July 22, 2024

Could you share the definition of public.table2? So that we can reproduce more easily.

from citus.

lkral-navmatix avatar lkral-navmatix commented on July 22, 2024

Unfortunately table2 is fairly complex and references multiple other tables. I will see if I can trigger this with some simple table.

We have also encountered this same exact issue in similar table later on and looking at things in common:

  • table2 is reference table
  • table1 PK has the exact same structure (first column is GENERATED ALWAYS AS IDENTITY, second one is foreign key)
  • table1 is sharded using the foreign key that was used as second column in PK

from citus.

JelteF avatar JelteF commented on July 22, 2024

@gokhangulbiz Could you have quick look at this to understand what is going on here? It seems related to the GENERATED AS IDENTITY work that you did.

from citus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.