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] Add rail guards to prevent restore if shared relations are modified #9503

Closed
sanketkedia opened this issue Jul 28, 2021 · 2 comments
Closed
Assignees
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue

Comments

@sanketkedia
Copy link
Contributor

sanketkedia commented Jul 28, 2021

Jira Link: DB-2082
For PITR support for YSQL, we support snapshots and recovery per database (to take care of indexes, related foreign key constraints, etc). However, Postgres has several shared tables that are not maintained at a per-database level but instead, there's one common relation shared by all the tables. For example, tablespaces and roles fall under this purview. If such tables are modified and we want to restore a database such that these need to be changed then we aren't sure if we want to support it or not. For starters, it can have side effects that affect other databases that aren't being tracked by PITR. At the very least we should add rail guards to error out if the user wants to restore in such scenarios. cc @spolitov @bmatican

@sanketkedia sanketkedia added the area/docdb YugabyteDB core features label Jul 28, 2021
@sanketkedia sanketkedia self-assigned this Jul 28, 2021
@sanketkedia sanketkedia marked this as a duplicate and then as not a duplicate of #9912 Sep 2, 2021
@sanketkedia sanketkedia reopened this Sep 2, 2021
@vkulichenko
Copy link
Contributor

I don't think it's a good idea to error out the restore. This can lead to a scenario when a user makes a change in a global object (i.e., drops a tablespace), then tries after some time accidentally drops an unrelated table, but can't restore it because PITR doesn't work anymore.

Instead, we should error out the operations that potentially break PITR, like dropping a tablespace or a role. Are there any other operations like that @sanketkedia?

@yugabyte-ci yugabyte-ci added kind/bug This issue is a bug priority/medium Medium priority issue labels Jun 9, 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 Jul 30, 2022
@lingamsandeep
Copy link
Contributor

Global objects will not be restored. These are user's responsibility.

@lingamsandeep lingamsandeep closed this as not planned Won't fix, can't repro, duplicate, stale Sep 27, 2023
@github-project-automation github-project-automation bot moved this to Done in PITR Aug 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/docdb YugabyteDB core features kind/enhancement This is an enhancement of an existing feature priority/medium Medium priority issue
Projects
Status: Done
Status: Done
Development

No branches or pull requests

4 participants