- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitff992c0
committed
pg_upgrade: Fix large object COMMENTS, SECURITY LABELS
When performing a pg_upgrade, we copy the files behind pg_largeobjectand pg_largeobject_metadata, allowing us to avoid having to dump out andreload the actual data for large objects and their ACLs.Unfortunately, that isn't all of the information which can be associatedwith large objects. Currently, we also support COMMENTs and SECURITYLABELs with large objects and these were being silently dropped during apg_upgrade as pg_dump would skip everything having to do with a largeobject and pg_upgrade only copied the tables mentioned to the newcluster.As the file copies happen after the catalog dump and reload, we can'tsimply include the COMMENTs and SECURITY LABELs in pg_dump's binary-modeoutput but we also have to include the actual large object definition aswell. With the definition, comments, and security labels in the pg_dumpoutput and the file copies performed by pg_upgrade, all of the data andmetadata associated with large objects is able to be successfully pulledforward across a pg_upgrade.In 9.6 and master, we can simply adjust the dump bitmask to indicatewhich components we don't want. In 9.5 and earlier, we have to putexplciit checks in in dumpBlob() and dumpBlobs() to not include the ACLor the data when in binary-upgrade mode.Adjustments made to the privileges regression test to allow another test(large_object.sql) to be added which explicitly leaves a large objectwith a comment in place to provide coverage of that case withpg_upgrade.Back-patch to all supported branches.Discussion:https://postgr.es/m/20170221162655.GE9812@tamriel.snowman.net1 parenta8df75b commitff992c0
File tree
10 files changed
+80
-16
lines changed- src
- bin/pg_dump
- t
- test/regress
- expected
- sql
10 files changed
+80
-16
lines changedLines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
120 | 120 |
| |
121 | 121 |
| |
122 | 122 |
| |
| 123 | + | |
123 | 124 |
| |
124 | 125 |
| |
125 | 126 |
| |
|
Lines changed: 9 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2874 | 2874 |
| |
2875 | 2875 |
| |
2876 | 2876 |
| |
2877 |
| - | |
| 2877 | + | |
| 2878 | + | |
| 2879 | + | |
| 2880 | + | |
| 2881 | + | |
| 2882 | + | |
| 2883 | + | |
| 2884 | + | |
| 2885 | + | |
2878 | 2886 |
| |
2879 | 2887 |
| |
2880 | 2888 |
| |
|
Lines changed: 28 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
772 | 772 |
| |
773 | 773 |
| |
774 | 774 |
| |
775 |
| - | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
776 | 784 |
| |
777 | 785 |
| |
778 | 786 |
| |
| |||
852 | 860 |
| |
853 | 861 |
| |
854 | 862 |
| |
| 863 | + | |
855 | 864 |
| |
856 | 865 |
| |
857 | 866 |
| |
| |||
2900 | 2909 |
| |
2901 | 2910 |
| |
2902 | 2911 |
| |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
| 2922 | + | |
| 2923 | + | |
| 2924 | + | |
| 2925 | + | |
2903 | 2926 |
| |
2904 | 2927 |
| |
2905 | 2928 |
| |
| |||
8828 | 8851 |
| |
8829 | 8852 |
| |
8830 | 8853 |
| |
8831 |
| - | |
| 8854 | + | |
| 8855 | + | |
8832 | 8856 |
| |
8833 | 8857 |
| |
8834 | 8858 |
| |
| |||
14223 | 14247 |
| |
14224 | 14248 |
| |
14225 | 14249 |
| |
14226 |
| - | |
| 14250 | + | |
| 14251 | + | |
14227 | 14252 |
| |
14228 | 14253 |
| |
14229 | 14254 |
| |
|
Lines changed: 10 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
39 | 39 |
| |
40 | 40 |
| |
41 | 41 |
| |
42 |
| - | |
| 42 | + | |
| 43 | + | |
43 | 44 |
| |
44 | 45 |
| |
45 | 46 |
| |
46 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
47 | 53 |
| |
48 | 54 |
| |
49 | 55 |
| |
| |||
334 | 340 |
| |
335 | 341 |
| |
336 | 342 |
| |
| 343 | + | |
337 | 344 |
| |
338 | 345 |
| |
339 | 346 |
| |
| |||
348 | 355 |
| |
349 | 356 |
| |
350 | 357 |
| |
351 |
| - | |
352 | 358 |
| |
353 | 359 |
| |
354 | 360 |
| |
| |||
666 | 672 |
| |
667 | 673 |
| |
668 | 674 |
| |
| 675 | + | |
669 | 676 |
| |
670 | 677 |
| |
671 | 678 |
| |
| |||
681 | 688 |
| |
682 | 689 |
| |
683 | 690 |
| |
684 |
| - | |
685 | 691 |
| |
686 | 692 |
| |
687 | 693 |
| |
|
Lines changed: 15 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + |
Lines changed: 4 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
15 |
| - | |
| 15 | + | |
16 | 16 |
| |
17 | 17 |
| |
18 | 18 |
| |
| |||
1173 | 1173 |
| |
1174 | 1174 |
| |
1175 | 1175 |
| |
1176 |
| - | |
| 1176 | + | |
1177 | 1177 |
| |
1178 | 1178 |
| |
1179 |
| - | |
1180 | 1179 |
| |
| 1180 | + | |
1181 | 1181 |
| |
1182 | 1182 |
| |
1183 | 1183 |
| |
| |||
1546 | 1546 |
| |
1547 | 1547 |
| |
1548 | 1548 |
| |
1549 |
| - | |
| 1549 | + | |
1550 | 1550 |
| |
1551 | 1551 |
| |
1552 | 1552 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
84 | 84 |
| |
85 | 85 |
| |
86 | 86 |
| |
87 |
| - | |
| 87 | + | |
88 | 88 |
| |
89 | 89 |
| |
90 | 90 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
116 | 116 |
| |
117 | 117 |
| |
118 | 118 |
| |
| 119 | + | |
119 | 120 |
| |
120 | 121 |
| |
121 | 122 |
| |
|
Lines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + |
Lines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
20 |
| - | |
| 20 | + | |
21 | 21 |
| |
22 | 22 |
| |
23 | 23 |
| |
| |||
729 | 729 |
| |
730 | 730 |
| |
731 | 731 |
| |
732 |
| - | |
| 732 | + | |
733 | 733 |
| |
734 | 734 |
| |
735 | 735 |
| |
| |||
960 | 960 |
| |
961 | 961 |
| |
962 | 962 |
| |
963 |
| - | |
| 963 | + | |
964 | 964 |
| |
965 | 965 |
| |
966 | 966 |
| |
|
0 commit comments
Comments
(0)