-
Notifications
You must be signed in to change notification settings - Fork 684
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding local tables to metadata: Limitations & TO-DO's #4145
Comments
This seems to work for me on master. |
Updated the issue with new improvements made in 10.0 and with new improvement ideas, soon will also look into sql coverage items to see what we improved in this area. |
Multi-level partitioned tables are also not supported |
Updateable views are not supported on Citus local tables: show citus.use_citus_managed_tables ;
┌────────────────────────────────┐
│ citus.use_citus_managed_tables │
├────────────────────────────────┤
│ on │
└────────────────────────────────┘
CREATE TABLE aa (a int, b int);
CREATE VIEW aav1 AS SELECT * FROM aa;
INSERT INTO aav1 VALUES (1,2);
ERROR: cannot modify views when the query contains citus tables |
Another relatively important limitation: #6318 |
Limitations:
Existing limitations affecting citus local tables as well as other citus tables:
INSERT INTO citus_local_table
with subqueries.Not supporting IDENTITY columnsNow supported Support IDENTITY columns with citus tables and table operations #4660Limitations specific to citus local tables:
CASCADE
,SET NULL
&SET DEFAULT
behaviors (RESTRICT
&NO ACTION
behaviors are still allowed)UPDATE/DELETE
s involving postgres local and citus local tablesUPDATE/DELETE
of reference tables selecting from citus local tables (other way around is just OK).Limitations that we might not think to resolve:
Not supporting creating foreign keys between citus local tables and postgres tablesSolving this problem is equivalent to bringing foreign key support between postgres local tables and reference tables and that was the main point that leaded us to bring citus local tables :)
Considerations & further improvements on citus local tabes:
ColocationId
for citus local tables is set toINVALID_COLOCATION_ID
.We might think of setting common
colocationId
s for citus local tables thinking of them as grouped according to the nodes that their shard live after enabling above item.Some other TO-DO's:
We need to fix citus local table creation from tables with GENERATED STORED columns (Cannot create citus local table with generated columns #4151)We need to adjust pre-existing views on citus local tables after citus local table creation so that pre-existing views point to the shell relation, not to the shard relation. Recreate exisiting views on local table after creating citus local table #4147(Hint:
DeferErrorIfUnsupportedModifyQueryWithPostgresLocalTable
)The text was updated successfully, but these errors were encountered: