Repository navigation
Commit a891d3f
Task LAV-3576: Schema and database backups and restore: ADD BACKUP on SCHEMA / DATABASE sets, CREATE SCHEMA / DATABASE FROM BACKUP SET (#4102)
* Task LAV-3576: schema and database backups and restore
ALTER BACKUP SET ADD BACKUP on FOR SCHEMA / FOR DATABASE sets parks a
clone of the container under a hidden `__sf$backup$<seq>` database;
CREATE SCHEMA / DATABASE ... FROM BACKUP SET restores from it. Kind
mismatch (511819), unknown id (511807), existing destination and
IF NOT EXISTS are handled. A schema set follows its target across a
rename. The hidden copies are excluded from SHOW VIEWS IN ACCOUNT, SHOW
<keys> IN ACCOUNT and the ACCOUNT_USAGE TABLES / COLUMNS / SCHEMATA /
VIEWS / SEQUENCES / TAG_REFERENCES views.
Kinds not carried yet are xfailed against LAV-3728 (file formats),
LAV-3729 (tasks), LAV-3730 (tags), LAV-3731 (dynamic tables).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Task LAV-3576: carry object grants through schema/database backup restore
ADD BACKUP on a SCHEMA / DATABASE set records the non-ownership privileges
granted on the container's objects in the backup's meta; CREATE SCHEMA /
DATABASE ... FROM BACKUP SET re-grants them on the restored objects. Adds
the grant kind to test_schema_restore_contents with a Cloud snapshot.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* Task LAV-3576: project ACLs and re-key qualified names on container grant restore
Restored TABLE/VIEW/STREAM grants now reproject their PG ACLs, qualified
object_names (sequences, file formats, policies, qualified routines) are
re-keyed to the destination schema, and restored sequences get an
OWNERSHIP edge. SHOW GRANTS ON SEQUENCE / FILE FORMAT resolves 2- and
3-part names.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>1 parent da2030b commit a891d3f
3 files changed
Lines changed: 36 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6173 | 6173 | | |
6174 | 6174 | | |
6175 | 6175 | | |
6176 | | - | |
| 6176 | + | |
6177 | 6177 | | |
6178 | 6178 | | |
6179 | 6179 | | |
6180 | | - | |
| 6180 | + | |
| 6181 | + | |
| 6182 | + | |
6181 | 6183 | | |
6182 | 6184 | | |
6183 | 6185 | | |
| |||
9994 | 9996 | | |
9995 | 9997 | | |
9996 | 9998 | | |
9997 | | - | |
| 9999 | + | |
| 10000 | + | |
9998 | 10001 | | |
9999 | 10002 | | |
10000 | 10003 | | |
10001 | 10004 | | |
10002 | 10005 | | |
10003 | 10006 | | |
10004 | 10007 | | |
10005 | | - | |
| 10008 | + | |
10006 | 10009 | | |
10007 | 10010 | | |
10008 | 10011 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
633 | 633 | | |
634 | 634 | | |
635 | 635 | | |
636 | | - | |
| 636 | + | |
637 | 637 | | |
638 | 638 | | |
639 | 639 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
868 | 868 | | |
869 | 869 | | |
870 | 870 | | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
| 874 | + | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
| 880 | + | |
| 881 | + | |
871 | 882 | | |
872 | 883 | | |
873 | 884 | | |
| |||
891 | 902 | | |
892 | 903 | | |
893 | 904 | | |
894 | | - | |
| 905 | + | |
| 906 | + | |
| 907 | + | |
895 | 908 | | |
896 | 909 | | |
897 | 910 | | |
| |||
906 | 919 | | |
907 | 920 | | |
908 | 921 | | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
909 | 929 | | |
910 | 930 | | |
911 | 931 | | |
| |||
6351 | 6371 | | |
6352 | 6372 | | |
6353 | 6373 | | |
6354 | | - | |
6355 | | - | |
6356 | | - | |
| 6374 | + | |
| 6375 | + | |
| 6376 | + | |
| 6377 | + | |
| 6378 | + | |
6357 | 6379 | | |
6358 | 6380 | | |
6359 | 6381 | | |
| |||
6369 | 6391 | | |
6370 | 6392 | | |
6371 | 6393 | | |
6372 | | - | |
| 6394 | + | |
| 6395 | + | |
6373 | 6396 | | |
6374 | 6397 | | |
6375 | 6398 | | |
| |||
0 commit comments