-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…ated to table rewrite and table partition Summary: This diff fixes two issues of the colocation option in table creation. (1) Table rewrite YB table rewrite operations like ALTER TABLE ADD PRIMARY KEY and REFRESH MATERIALIZED VIEW create a new YB table under the hood. `reloptions` field in `pg_class` catalog table is read to maintain the property of tables. Option value in `reloptions` syntax like `colocation=0` is parsed as integer type by the PG parser, but when untransformed from `reloptions` field, its type is string. To solve this issue, extend function `defGetBoolean` to process string `0` and `1` as false and true, respectively. (2) Table partition We have a check to prevent tablegroup from using with colocation option mainly serving as a grammar guard, and this check is placed in an inappropriate place causing table partition creation to fail when the colocation option is specified. Solve this issue by moving the check to an earlier place in the CREATE TABLE execution path. Jira: DB-9268, DB-9896 Original commit: 2cbb49d / D33001 Test Plan: ./yb_build.sh --java-test 'org.yb.pgsql.TestPgRegressColocation' Reviewers: tverona, fizaa Reviewed By: fizaa Subscribers: yql Tags: #jenkins-ready Differential Revision: https://phorge.dev.yugabyte.com/D33346
- Loading branch information
Showing
5 changed files
with
196 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters