- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit4f16152
committed
Fix omission of column-level privileges in selective pg_restore.
In a selective restore, ACLs for a table should be dumped if thetable is selected to be dumped. However, if the table has bothtable-level and column-level ACLs, only the table-level ACL wasrestored. This happened because _tocEntryRequired assumed thatan ACL could have only one dependency (the one on its table),and punted if there was more than one. But since commitea91253,column-level ACLs also depend on the table-level ACL if any, toensure correct ordering in parallel restores. To fix, adjust thelogic in _tocEntryRequired to ignore dependencies on ACLs.I extended a test case in 002_pg_dump.pl so that it purports totest for this; but in fact the test passes even without the fix.That's because this bug only manifests during a selective restore,while the scenarios 002_pg_dump.pl tests include only selective dumps.Perhaps somebody would like to extend the script so that it can testscenarios including selective restore, but I'm not touching that.Euler Taveira and Tom Lane, per report from Kong Man.Back-patch to all supported branches.Discussion:https://postgr.es/m/DM4PR11MB73976902DBBA10B1D652F9498B06A@DM4PR11MB7397.namprd11.prod.outlook.com1 parent7a310ca commit4f16152
2 files changed
+27
-6
lines changedLines changed: 22 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2912 | 2912 |
| |
2913 | 2913 |
| |
2914 | 2914 |
| |
2915 |
| - | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
2916 | 2919 |
| |
2917 | 2920 |
| |
2918 | 2921 |
| |
| |||
2923 | 2926 |
| |
2924 | 2927 |
| |
2925 | 2928 |
| |
2926 |
| - | |
2927 |
| - | |
| 2929 | + | |
| 2930 | + | |
| 2931 | + | |
| 2932 | + | |
| 2933 | + | |
| 2934 | + | |
| 2935 | + | |
| 2936 | + | |
| 2937 | + | |
| 2938 | + | |
| 2939 | + | |
| 2940 | + | |
| 2941 | + | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
2928 | 2947 |
| |
2929 | 2948 |
| |
2930 | 2949 |
| |
|
Lines changed: 5 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3105 | 3105 |
| |
3106 | 3106 |
| |
3107 | 3107 |
| |
3108 |
| - | |
3109 |
| - | |
| 3108 | + | |
| 3109 | + | |
| 3110 | + | |
3110 | 3111 |
| |
3111 | 3112 |
| |
3112 |
| - | |
| 3113 | + | |
| 3114 | + | |
3113 | 3115 |
| |
3114 | 3116 |
| |
3115 | 3117 |
| |
|
0 commit comments
Comments
(0)