forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9a974cb
committed
pg_upgrade: Preserve relfilenodes and tablespace OIDs.
Currently, database OIDs, relfilenodes, and tablespace OIDs can allchange when a cluster is upgraded using pg_upgrade. It seems betterto preserve them, because (1) it makes troubleshooting pg_upgradeeasier, since you don't have to do a lot of work to match up filesin the old and new clusters, (2) it allows 'rsync' to save bandwidthwhen used to re-sync a cluster after an upgrade, and (3) if we everencrypt or sign blocks, we would likely want to use a nonce thatdepends on these values.This patch only arranges to preserve relfilenodes and tablespaceOIDs. The task of preserving database OIDs is left for another patch,since it involves some complexities that don't exist in these cases.Database OIDs have a similar issue, but there are some tricky pointsin that case that do not apply to these cases, so that problem is leftfor another patch.Shruthi KC, based on an earlier patch from Antonin Houska, reviewedand with some adjustments by me.Discussion:http://postgr.es/m/CA+TgmoYgTwYcUmB=e8+hRHOFA0kkS6Kde85+UNdon6q7bt1niQ@mail.gmail.com1 parent2131c04 commit9a974cb
File tree
16 files changed
+247
-108
lines changed- src
- backend
- bootstrap
- catalog
- commands
- utils/adt
- bin
- pg_dump
- pg_upgrade
- include/catalog
- test/modules/spgist_name_ops/expected
16 files changed
+247
-108
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
212 | 212 |
| |
213 | 213 |
| |
214 | 214 |
| |
215 |
| - | |
| 215 | + | |
| 216 | + | |
216 | 217 |
| |
217 | 218 |
| |
218 | 219 |
| |
|
Lines changed: 48 additions & 15 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
91 | 91 |
| |
92 | 92 |
| |
93 | 93 |
| |
| 94 | + | |
94 | 95 |
| |
| 96 | + | |
95 | 97 |
| |
96 | 98 |
| |
97 | 99 |
| |
| |||
285 | 287 |
| |
286 | 288 |
| |
287 | 289 |
| |
288 |
| - | |
289 |
| - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
290 | 296 |
| |
291 | 297 |
| |
292 | 298 |
| |
| |||
306 | 312 |
| |
307 | 313 |
| |
308 | 314 |
| |
309 |
| - | |
| 315 | + | |
| 316 | + | |
310 | 317 |
| |
311 |
| - | |
312 | 318 |
| |
313 | 319 |
| |
314 | 320 |
| |
| |||
343 | 349 |
| |
344 | 350 |
| |
345 | 351 |
| |
346 |
| - | |
347 |
| - | |
348 |
| - | |
349 |
| - | |
350 |
| - | |
351 |
| - | |
| 352 | + | |
| 353 | + | |
352 | 354 |
| |
353 | 355 |
| |
354 | 356 |
| |
355 |
| - | |
356 |
| - | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
357 | 363 |
| |
358 | 364 |
| |
359 | 365 |
| |
| |||
1121 | 1127 |
| |
1122 | 1128 |
| |
1123 | 1129 |
| |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1124 | 1133 |
| |
1125 | 1134 |
| |
1126 | 1135 |
| |
| |||
1183 | 1192 |
| |
1184 | 1193 |
| |
1185 | 1194 |
| |
1186 |
| - | |
| 1195 | + | |
1187 | 1196 |
| |
1188 | 1197 |
| |
1189 | 1198 |
| |
| |||
1200 | 1209 |
| |
1201 | 1210 |
| |
1202 | 1211 |
| |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
1203 | 1220 |
| |
1204 | 1221 |
| |
1205 | 1222 |
| |
| |||
1211 | 1228 |
| |
1212 | 1229 |
| |
1213 | 1230 |
| |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
1214 | 1242 |
| |
1215 | 1243 |
| |
1216 | 1244 |
| |
| |||
1250 | 1278 |
| |
1251 | 1279 |
| |
1252 | 1280 |
| |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
1253 | 1285 |
| |
1254 | 1286 |
| |
1255 | 1287 |
| |
1256 | 1288 |
| |
1257 | 1289 |
| |
1258 |
| - | |
| 1290 | + | |
1259 | 1291 |
| |
1260 | 1292 |
| |
1261 | 1293 |
| |
| |||
1264 | 1296 |
| |
1265 | 1297 |
| |
1266 | 1298 |
| |
1267 |
| - | |
| 1299 | + | |
| 1300 | + | |
1268 | 1301 |
| |
1269 | 1302 |
| |
1270 | 1303 |
| |
|
Lines changed: 21 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
87 | 87 |
| |
88 | 88 |
| |
89 | 89 |
| |
| 90 | + | |
90 | 91 |
| |
91 | 92 |
| |
92 | 93 |
| |
| |||
733 | 734 |
| |
734 | 735 |
| |
735 | 736 |
| |
| 737 | + | |
736 | 738 |
| |
737 | 739 |
| |
738 | 740 |
| |
| |||
904 | 906 |
| |
905 | 907 |
| |
906 | 908 |
| |
907 |
| - | |
| 909 | + | |
908 | 910 |
| |
909 | 911 |
| |
910 | 912 |
| |
| |||
914 | 916 |
| |
915 | 917 |
| |
916 | 918 |
| |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
917 | 935 |
| |
918 | 936 |
| |
919 | 937 |
| |
| |||
940 | 958 |
| |
941 | 959 |
| |
942 | 960 |
| |
943 |
| - | |
| 961 | + | |
| 962 | + | |
944 | 963 |
| |
945 | 964 |
| |
946 | 965 |
| |
|
Lines changed: 15 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
89 | 89 |
| |
90 | 90 |
| |
91 | 91 |
| |
| 92 | + | |
92 | 93 |
| |
93 | 94 |
| |
94 | 95 |
| |
| |||
340 | 341 |
| |
341 | 342 |
| |
342 | 343 |
| |
343 |
| - | |
344 |
| - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
345 | 358 |
| |
346 | 359 |
| |
347 | 360 |
| |
|
Lines changed: 44 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
32 | 43 |
| |
33 | 44 |
| |
34 | 45 |
| |
| |||
84 | 95 |
| |
85 | 96 |
| |
86 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
87 | 109 |
| |
88 | 110 |
| |
89 | 111 |
| |
| |||
95 | 117 |
| |
96 | 118 |
| |
97 | 119 |
| |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
98 | 131 |
| |
99 | 132 |
| |
100 | 133 |
| |
| |||
106 | 139 |
| |
107 | 140 |
| |
108 | 141 |
| |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
109 | 153 |
| |
110 | 154 |
| |
111 | 155 |
| |
|
0 commit comments
Comments
(0)