backup: write tests to test behavior of materialized views
Materialized views should be included in BACKUP DATABASE and cluster. Write tests to confirm this behavior. (If behavior is not as expected, troubleshoot.)
We may wish to add this to the docs as well, in anticipation of user questions.
Epic CRDB-7779
Jira issue: CRDB-3902
Hi @shermanCRL, please add a C-ategory label to your issue. Check out the label system docs.
While you're here, please consider adding an A- label to help keep our repository tidy.
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is otan.
I tested this an everything seems to work fine -- the materialized views backup and restore as expected with the same values.
The one thing to note is that for RESTORE-ing a database into the cluster where it originally came from requires dropping or renaming the original database. If you go the rename path, having a materialized view that relies on that database does not allow renaming. This means we have to update our recommended steps for DR in light of materialized views.
Reopening because scope is to write tests
We have at least one test for materialised views.