Skip to content
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

[Phase 2][Post GA][YSQL] Allow changing the colocated table/database option after creation #4463

Open
PatrLind opened this issue May 13, 2020 · 4 comments
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@PatrLind
Copy link

PatrLind commented May 13, 2020

Jira Link: [DB-369](https://yugabyte.atlassian.net/browse/DB-369)
At this time it is only possible to change the colocation option during database creation or during table creation in a already colocated database.

It would be very useful to be able to alter this on an already existing database or table as databases and data sets evolve over time.

Example how I imagine this could be changed by a user:

-- Change a table to be colocated regardless of the colocation status of the database
ALTER TABLE table_name WITH colocated = true;

-- Change all tables to be colocated unless opted out
ALTER DATABASE database_name WITH colocated = true;
@yugabyte-ci yugabyte-ci added the community/request Issues created by external users label May 13, 2020
@thinknirmal
Copy link

Duplicate of #4396

@ddorian ddorian added the area/ysql Yugabyte SQL (YSQL) label May 13, 2020
@snehalbhavsar916
Copy link

Me too had this problem, Initially I created database without colocated flag and thus it is by default false and my use case is that I have created database and imported 2-3 GB data in ysql, which resulted into increasing load on the database server. Then I tried altering the database and tables to set colocated =true, but it did not supported.

Also, if the architecture of yugabyte supports multiple tablets for large tables then it must be optimised to handle such cases.

@bmatican bmatican added this to Backlog in YSQL via automation Oct 16, 2020
@jaki
Copy link
Contributor

jaki commented Oct 31, 2020

keywords: pull, out, pull-out, opt-out, opt

This should be a dependency for #4396 because #4396 is this + automatic.

@jaki jaki added this to To do in Colocation via automation Oct 31, 2020
@frozenspider frozenspider changed the title Allow changing the colocated table/database option after creation [YSQL] Allow changing the colocated table/database option after creation Apr 20, 2022
@tverona1 tverona1 changed the title [YSQL] Allow changing the colocated table/database option after creation [Phase 2][YSQL] Allow changing the colocated table/database option after creation May 17, 2022
@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels May 17, 2022
@tverona1 tverona1 changed the title [Phase 2][YSQL] Allow changing the colocated table/database option after creation [Phase 2][Post GA][YSQL] Allow changing the colocated table/database option after creation May 26, 2022
@yugabyte-ci yugabyte-ci added kind/new-feature This is a request for a completely new feature and removed kind/bug This issue is a bug labels Jul 20, 2022
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed kind/new-feature This is a request for a completely new feature labels Aug 18, 2022
@mgrosso
Copy link

mgrosso commented Jan 28, 2023

This feature would be important for an application I have attempted to proof-of-concept using with Yugabyte.

In my case, I would start with one database with colocation = 'true', create a number of schemas, and then colocate the subset of schemas that acquired enough data to merit that.

Less common, but probably needed, would be the ability to pull a table out of a colocated database or schema.

I would never need or want to un-colocate a schema or database once it was colocated, although some tables in them will need that obviously as requested in #4396

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) community/request Issues created by external users kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
Status: No status
YSQL
  
Backlog
Development

No branches or pull requests

8 participants