Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sctest: Augmented BACKUP/RESTORE tests with table-level restore
Previously, the Backup test in declarative schema changer backups the whole database and restore the whole database with `RESTORE DATABASE`. This PR augments the test by adding another flavor to restore: `RESTORE TABLE tbl1,...,tblN` where `tblx` are *all* the tables in the backup. This will nicely give us coverage for `RESTORE TABLE` when a declarative schema changer job is running. Note that ideally we want to randomly restore only a subset of all the table. Indeed I tried to implement that but realize it was blocked by one limitation in the declarative shcema changer: We don't yet support restore schema changer job that skips missing sequences (E.g. if we have a table `t` and a sequence `s`, and I want to `ALTER TABLE t ADD COLUMN c DEFAULT nextval('s')`, we backup database in PostCommit phase. Later when we restore just `t`, the schema changer job will run into error `error executing 'missing rewrite for id 109 in <column_default_expression:<table_id:108 column_id:2 embedded_expr:<expr:"nextval(109:::REGCLASS)" uses_sequence_ids:109 >)`) In other words, we have not implemented the equivalent of `skip_missing_sequences`, which is an option for RESTORE, for schema changer job. Release justification: test-only changes Release note: None
- Loading branch information