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 1][YSQL][Tablegroups] Partitioned tables do not inherit tablegroup #13086

Closed
frozenspider opened this issue Jun 28, 2022 · 0 comments
Closed
Assignees
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@frozenspider
Copy link
Contributor

frozenspider commented Jun 28, 2022

Jira Link: DB-2800

Description

When you create a PARTITION BY table with TABLEGROUP, its PARTITION tables are created w/o tablegroup unless you explicitly declare it.
Example:

CREATE TABLEGROUP tg1;
CREATE TABLE prt (id int PRIMARY KEY, v int) PARTITION BY RANGE (id) TABLEGROUP tg1;
CREATE INDEX prt_idx ON prt (v);

CREATE TABLE prt_p1 PARTITION OF prt FOR VALUES FROM (1) TO (4);
CREATE TABLE prt_p2 PARTITION OF prt FOR VALUES FROM (5) TO (9) TABLEGROUP tg1;

\dgrt
                 List of tablegroup tables
 Group Name | Group Owner |     Name     | Type  |  Owner
------------+-------------+--------------+-------+----------
 tg1        | yugabyte    | prt          | table | yugabyte
 tg1        | yugabyte    | prt_idx      | index | yugabyte
 tg1        | yugabyte    | prt_p2       | table | yugabyte
 tg1        | yugabyte    | prt_p2_v_idx | index | yugabyte
(4 rows)
@frozenspider frozenspider added kind/bug This issue is a bug area/ysql Yugabyte SQL (YSQL) status/awaiting-triage Issue awaiting triage labels Jun 28, 2022
@frozenspider frozenspider self-assigned this Jun 28, 2022
@frozenspider frozenspider added this to To do in Colocation via automation Jun 28, 2022
@frozenspider frozenspider added this to Backlog in YSQL via automation Jun 28, 2022
@yugabyte-ci yugabyte-ci added the priority/medium Medium priority issue label Jun 28, 2022
@yugabyte-ci yugabyte-ci removed the status/awaiting-triage Issue awaiting triage label Jun 29, 2022
@arpang arpang assigned arpang and unassigned frozenspider Aug 23, 2022
@yugabyte-ci yugabyte-ci added kind/enhancement This is an enhancement of an existing feature and removed kind/bug This issue is a bug labels Aug 23, 2022
@arpang arpang moved this from To do to In progress in Colocation Aug 24, 2022
arpang added a commit to arpang/yugabyte-db that referenced this issue Aug 25, 2022
…arent table

Summary:
A partitioned table (parent) and its partitions (children) must belong to the same tablegroup, if any. In order to enforce this, TABLEGROUP clause has been removed from the partition create statement. In
addition, the parent table's tablegroup id is used while creating a partition.

Test Plan: TODO

Subscribers: yql

Differential Revision: https://phabricator.dev.yugabyte.com/D19152
@arpang arpang closed this as completed in ea8865d Aug 31, 2022
YSQL automation moved this from Backlog to Done Aug 31, 2022
Colocation automation moved this from In progress to Done Aug 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ysql Yugabyte SQL (YSQL) kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
YSQL
  
Done
Development

No branches or pull requests

3 participants