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

[docdb] PITR: Restore PG system table data on a per database level #8452

Closed
bmatican opened this issue May 14, 2021 · 0 comments
Closed

[docdb] PITR: Restore PG system table data on a per database level #8452

bmatican opened this issue May 14, 2021 · 0 comments
Assignees
Labels
area/docdb YugabyteDB core features

Comments

@bmatican
Copy link
Contributor

This will require some broader conversation, as apparently for PG there are also some shared objects, like roles & permissions, tablespaces, etc.

@bmatican bmatican added the area/docdb YugabyteDB core features label May 14, 2021
@sanketkedia sanketkedia self-assigned this Jul 23, 2021
sanketkedia added a commit that referenced this issue Aug 2, 2021
Summary:
Currently, we only support PITR for DML for YSQL databases. This diff adds support for DDL restores
for YSQL databases.

We needed to restore the pg_catalog tables as well as bump up the version number in
pg_yb_catalog_version table.

With this diff, restores for Create/Delete works. Some of the alter command restores also work like
adding a column, deleting a column, renaming a column. Other types of alters are yet to be tested.

Test Plan:
ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter YbAdminSnapshotScheduleTest.PgsqlAddColumn
ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter
YbAdminSnapshotScheduleTest.PgsqlCreateTable
ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter
YbAdminSnapshotScheduleTest.PgsqlCreateIndex
ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter
YbAdminSnapshotScheduleTest.PgsqlDropTable
ybd --cxx_test yb-admin-snapshot-schedule-test --gtest-filter
YbAdminSnapshotScheduleTest.PgsqlDropIndex

Reviewers: dsrinivasan, bogdan, sergei

Reviewed By: sergei

Subscribers: zyu, ybase

Differential Revision: https://phabricator.dev.yugabyte.com/D12374
sanketkedia added a commit that referenced this issue Aug 2, 2021
Summary:
After commit 7a779da, there were build errors on GCC. This
short diff fixes them.

Test Plan: Jenkins

Reviewers: sergei

Reviewed By: sergei

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D12454
spolitov added a commit that referenced this issue Sep 1, 2021
Summary:
This diff switches sys catalog iteration during restore to lower layer.
To avoid encoding/decoding QLTableRow.
It speeds up system catalog restoration by multiple times in debug build.

Test Plan: ybd --gtest_filter YbAdminSnapshotScheduleTest.PgsqlDropTable

Reviewers: skedia

Reviewed By: skedia

Subscribers: ybase, bogdan

Differential Revision: https://phabricator.dev.yugabyte.com/D12685
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features
Projects
None yet
Development

No branches or pull requests

3 participants