forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit1ab67c9
committed
vacuumdb: Skip temporary tables in query to build list of relations
Running vacuumdb with a non-superuser while another user has created atemporary table would lead to a mid-flight permission failure,interrupting the operation. vacuum_rel() skips temporary relations ofother backends, and it makes no sense for vacuumdb to know about theserelations, so let's switch it to ignore temporary relations entirely.Adding a qual in the query based on relpersistence simplifies thegeneration of its WHERE clause in vacuum_one_database(), per se theremoval of "has_where".Author: VaibhaveS, Michael PaquierReviewed-by: Fujii MasaoDiscussion:https://postgr.es/m/CAM_eQjwfAR=y3G1fGyS1U9FTmc+FyJm9amNfY2QCZBnDDbNPZg@mail.gmail.comBackpatch-through: 121 parent7fdeaf5 commit1ab67c9
1 file changed
+25
-15
lines changedLines changed: 25 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
491 | 491 |
| |
492 | 492 |
| |
493 | 493 |
| |
494 |
| - | |
495 | 494 |
| |
496 | 495 |
| |
497 | 496 |
| |
| |||
665 | 664 |
| |
666 | 665 |
| |
667 | 666 |
| |
668 |
| - | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
669 | 671 |
| |
670 | 672 |
| |
671 | 673 |
| |
| |||
676 | 678 |
| |
677 | 679 |
| |
678 | 680 |
| |
| 681 | + | |
679 | 682 |
| |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
680 | 695 |
| |
681 | 696 |
| |
682 |
| - | |
| 697 | + | |
683 | 698 |
| |
684 | 699 |
| |
685 |
| - | |
686 |
| - | |
| 700 | + | |
687 | 701 |
| |
688 | 702 |
| |
689 | 703 |
| |
| |||
695 | 709 |
| |
696 | 710 |
| |
697 | 711 |
| |
698 |
| - | |
| 712 | + | |
699 | 713 |
| |
700 |
| - | |
701 |
| - | |
702 |
| - | |
| 714 | + | |
703 | 715 |
| |
704 | 716 |
| |
705 | 717 |
| |
| |||
712 | 724 |
| |
713 | 725 |
| |
714 | 726 |
| |
715 |
| - | |
| 727 | + | |
716 | 728 |
| |
717 | 729 |
| |
718 | 730 |
| |
719 | 731 |
| |
720 |
| - | |
721 |
| - | |
| 732 | + | |
722 | 733 |
| |
723 | 734 |
| |
724 | 735 |
| |
725 | 736 |
| |
726 | 737 |
| |
727 |
| - | |
| 738 | + | |
728 | 739 |
| |
729 | 740 |
| |
730 | 741 |
| |
731 | 742 |
| |
732 |
| - | |
733 |
| - | |
| 743 | + | |
734 | 744 |
| |
735 | 745 |
| |
736 | 746 |
| |
|
0 commit comments
Comments
(0)