-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[YSQL] Migrate pg_tablegroup to pg_yb_tablegroup #10190
Labels
area/ysql
Yugabyte SQL (YSQL)
Comments
timothy-e
changed the title
Migrate pg_tablegroup to pg_yb_tablegroup
[YSQL] Migrate pg_tablegroup to pg_yb_tablegroup
Oct 5, 2021
timothy-e
added a commit
that referenced
this issue
Nov 25, 2021
Summary: This patch replaces pg_tablegroup and all of its references with a new table pg_yb_tablgroup that has an additional column 'grptablespace'. In an upgraded cluster, pg_tablegroup table will still exist but it will not be used anymore. This can break backwards compatibility, but this is acceptable as this is a beta feature. This patch also contains initdb migration to copy over rows from pg_tablegroup to the new table pg_yb_tablegroup. This patch also relaxes a previous requirement from initdb migration that prevented user oids from being used in upgrade mode. This check has been relaxed to allow copying over oids from pg_tablegroup to pg_yb_tablegroup. The `upgradeIsIdempotent` test is also updated to 1. create early version of catalog 2. apply migrations 3. delete migrations table 4. apply migrations instead of 1. create new version of catalog 2. delete migrations table 3. apply migrations Test Plan: ``` ybd release --java-test org.yb.pgsql.TestYsqlUpgrade ybd release --java-test org.yb.pgsql.TestPgRegressTablegroup ``` Manual testing outlined in the migrations README Verified that we cannot delete a tablegroup if it is used by a table. Super user cannot delete it, even if modifiying system tables is enabled. * `ERROR: cannot drop table pg_yb_tablegroup because it is required by the database system` * enforced by `findDependentObjects` in `dependency.c` Reviewers: alex, dsrinivasan Reviewed By: alex, dsrinivasan Subscribers: smishra Differential Revision: https://phabricator.dev.yugabyte.com/D13448
timothy-e
added a commit
that referenced
this issue
Nov 26, 2021
Summary: This patch replaces pg_tablegroup and all of its references with a new table pg_yb_tablgroup that has an additional column 'grptablespace'. In an upgraded cluster, pg_tablegroup table will still exist but it will not be used anymore. This can break backwards compatibility, but this is acceptable as this is a beta feature. This patch also contains initdb migration to copy over rows from pg_tablegroup to the new table pg_yb_tablegroup. This patch also relaxes a previous requirement from initdb migration that prevented user oids from being used in upgrade mode. This check has been relaxed to allow copying over oids from pg_tablegroup to pg_yb_tablegroup. The `upgradeIsIdempotent` test is also updated to 1. create early version of catalog 2. apply migrations 3. delete migrations table 4. apply migrations instead of 1. create new version of catalog 2. delete migrations table 3. apply migrations Test Plan: ``` ybd release --java-test org.yb.pgsql.TestYsqlUpgrade ybd release --java-test org.yb.pgsql.TestPgRegressTablegroup ``` Manual testing outlined in the migrations README Verified that we cannot delete a tablegroup if it is used by a table. Super user cannot delete it, even if modifiying system tables is enabled. * `ERROR: cannot drop table pg_yb_tablegroup because it is required by the database system` * enforced by `findDependentObjects` in `dependency.c` Reviewers: alex, dsrinivasan Reviewed By: alex, dsrinivasan Subscribers: smishra Differential Revision: https://phabricator.dev.yugabyte.com/D13448
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add column grptablespace
The text was updated successfully, but these errors were encountered: