- Notifications
You must be signed in to change notification settings - Fork28
Commitcaae416
committed
Fix ordering in pg_dump of GRANTs
The order in which GRANTs are output is important as GRANTs which havebeen GRANT'd by individuals via WITH GRANT OPTION GRANTs have to comeafter the GRANT which included the WITH GRANT OPTION. This happensnaturally in the backend during normal operation as we only changeexisting ACLs in-place, only add new ACLs to the end, and when removingan ACL we remove any which depend on it also.Also, adjust the comments in acl.h to make this clear.Unfortunately, the updates to pg_dump to handle initial privilegesinvolved pulling apart ACLs and then combining them back together andcould end up putting them back together in an invalid order, leading todumps which wouldn't restore.Fix this by adjusting the queries used by pg_dump to ensure that theACLs are rebuilt in the same order in which they were originally.Back-patch to 9.6 where the changes for initial privileges were done.1 parent407e660 commitcaae416
2 files changed
+47
-18
lines changedLines changed: 36 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
729 | 729 |
| |
730 | 730 |
| |
731 | 731 |
| |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
732 | 737 |
| |
733 |
| - | |
734 |
| - | |
735 |
| - | |
736 |
| - | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
737 | 747 |
| |
738 | 748 |
| |
739 | 749 |
| |
740 | 750 |
| |
741 | 751 |
| |
742 | 752 |
| |
743 |
| - | |
744 |
| - | |
745 |
| - | |
746 |
| - | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
747 | 762 |
| |
748 | 763 |
| |
749 | 764 |
| |
| |||
768 | 783 |
| |
769 | 784 |
| |
770 | 785 |
| |
771 |
| - | |
772 |
| - | |
773 |
| - | |
774 |
| - | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
775 | 793 |
| |
776 | 794 |
| |
777 | 795 |
| |
778 | 796 |
| |
779 | 797 |
| |
780 | 798 |
| |
781 |
| - | |
782 |
| - | |
783 |
| - | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
| 804 | + | |
784 | 805 |
| |
785 | 806 |
| |
786 | 807 |
| |
|
Lines changed: 11 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
16 |
| - | |
17 |
| - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
18 | 26 |
| |
19 | 27 |
| |
20 | 28 |
| |
|
0 commit comments
Comments
(0)