Commit cab172f
committed
fix(relations): Ensure materialized view access method is restored
On Cloudberry, Greenplum 7+, materialized views must be created with
a specific access method (e.g., 'heap', 'ao_row') and associated storage
options in the 'WITH' clause (e.g., 'compresstype=zstd').
The prior implementation did not back up the 'USING' clause.
During restore, the database would default to another access method
(e.g., 'heap') which might not support the view's storage options.
This incompatibility caused the 'CREATE MATERIALIZED VIEW' command
to fail validation.
This commit corrects the failure by:
- Updating the view query for Cloudberry, GPDB 7+ to fetch the access method.
- Modifying DDL generation to include the 'USING' clause.
- Updating integration tests to verify the fix.1 parent 1051c58 commit cab172f
File tree
4 files changed
+45
-6
lines changed- integration
- meta/builtin
4 files changed
+45
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
550 | 550 | | |
551 | 551 | | |
552 | 552 | | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
553 | 556 | | |
554 | 557 | | |
555 | 558 | | |
| |||
568 | 571 | | |
569 | 572 | | |
570 | 573 | | |
571 | | - | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
572 | 577 | | |
573 | 578 | | |
574 | 579 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
501 | 501 | | |
502 | 502 | | |
503 | 503 | | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
504 | 507 | | |
505 | 508 | | |
506 | 509 | | |
| |||
514 | 517 | | |
515 | 518 | | |
516 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
517 | 523 | | |
518 | 524 | | |
519 | 525 | | |
| |||
529 | 535 | | |
530 | 536 | | |
531 | 537 | | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
532 | 541 | | |
533 | 542 | | |
534 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
682 | 682 | | |
683 | 683 | | |
684 | 684 | | |
685 | | - | |
686 | | - | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
687 | 691 | | |
688 | 692 | | |
689 | 693 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
| 462 | + | |
462 | 463 | | |
463 | 464 | | |
464 | 465 | | |
| |||
519 | 520 | | |
520 | 521 | | |
521 | 522 | | |
522 | | - | |
| 523 | + | |
523 | 524 | | |
524 | 525 | | |
525 | 526 | | |
| |||
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
538 | 557 | | |
539 | 558 | | |
540 | 559 | | |
| 560 | + | |
| 561 | + | |
541 | 562 | | |
542 | | - | |
| 563 | + | |
543 | 564 | | |
544 | 565 | | |
545 | 566 | | |
| |||
0 commit comments