forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit38bfae3
committed
pg_upgrade: Move all the files generated internally to a subdirectory
Historically, the location of any files generated by pg_upgrade, as ofthe per-database logs and internal dumps, has been the current workingdirectory, leaving all those files behind when using --retain or on afailure.Putting all those contents in a targeted subdirectory makes the wholeeasier to debug, and simplifies the code in charge of cleaning up thelogs. Note that another reason is that this facilitates the move ofpg_upgrade to TAP with a fixed location for all the logs to grab if thetest fails repeatedly.Initially, we thought about being able to specify the output directorywith a new option, but we have settled on using a subdirectory locatedat the root of the new cluster's data folder, "pg_upgrade_output.d",instead, as at the end the new data directory is the location of all thedata generated by pg_upgrade. There is a take with group permissionshere though: if the new data folder has been initialized with thisoption, we need to create all the files and paths with the correctpermissions or a base backup taken after a pg_upgrade --retain wouldfail, meaning that GetDataDirectoryCreatePerm() has to be called beforecreating the log paths, before a couple of sanity checks on the clustersand before getting the socket directory for the cluster's host settings.The idea of the new location is based on a suggestion from PeterEisentraut.Also thanks to Andrew Dunstan, Peter Eisentraut, Daniel Gustafsson, TomLane and Bruce Momjian for the discussion (in alphabetical order).Author: Justin PryzbyDiscussion:https://postgr.es/m/20211212025017.GN17618@telsasoft.com1 parentcbadfc1 commit38bfae3
File tree
11 files changed
+113
-73
lines changed- doc/src/sgml/ref
- src/bin/pg_upgrade
11 files changed
+113
-73
lines changedLines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
768 | 768 |
| |
769 | 769 |
| |
770 | 770 |
| |
771 |
| - | |
772 |
| - | |
| 771 | + | |
| 772 | + | |
773 | 773 |
| |
774 | 774 |
| |
775 | 775 |
| |
|
Lines changed: 0 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | 1 |
| |
2 | 2 |
| |
3 |
| - | |
4 | 3 |
| |
5 | 4 |
| |
6 | 5 |
| |
7 |
| - | |
8 | 6 |
| |
9 | 7 |
|
Lines changed: 1 addition & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
45 | 45 |
| |
46 | 46 |
| |
47 | 47 |
| |
48 |
| - | |
49 |
| - | |
50 |
| - | |
| 48 | + | |
51 | 49 |
| |
52 | 50 |
| |
53 | 51 |
| |
|
Lines changed: 8 additions & 4 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
783 | 783 |
| |
784 | 784 |
| |
785 | 785 |
| |
786 |
| - | |
| 786 | + | |
| 787 | + | |
787 | 788 |
| |
788 | 789 |
| |
789 | 790 |
| |
| |||
860 | 861 |
| |
861 | 862 |
| |
862 | 863 |
| |
863 |
| - | |
| 864 | + | |
| 865 | + | |
864 | 866 |
| |
865 | 867 |
| |
866 | 868 |
| |
| |||
959 | 961 |
| |
960 | 962 |
| |
961 | 963 |
| |
962 |
| - | |
| 964 | + | |
| 965 | + | |
963 | 966 |
| |
964 | 967 |
| |
965 | 968 |
| |
| |||
1214 | 1217 |
| |
1215 | 1218 |
| |
1216 | 1219 |
| |
1217 |
| - | |
| 1220 | + | |
| 1221 | + | |
1218 | 1222 |
| |
1219 | 1223 |
| |
1220 | 1224 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
25 |
| - | |
| 25 | + | |
26 | 26 |
| |
27 | 27 |
| |
| 28 | + | |
28 | 29 |
| |
29 | 30 |
| |
30 | 31 |
| |
| |||
52 | 53 |
| |
53 | 54 |
| |
54 | 55 |
| |
55 |
| - | |
| 56 | + | |
56 | 57 |
| |
57 | 58 |
| |
| 59 | + | |
58 | 60 |
| |
59 | 61 |
| |
60 | 62 |
| |
|
Lines changed: 4 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
78 | 78 |
| |
79 | 79 |
| |
80 | 80 |
| |
81 |
| - | |
| 81 | + | |
82 | 82 |
| |
83 | 83 |
| |
84 | 84 |
| |
85 | 85 |
| |
| 86 | + | |
86 | 87 |
| |
87 | 88 |
| |
88 | 89 |
| |
| |||
97 | 98 |
| |
98 | 99 |
| |
99 | 100 |
| |
| 101 | + | |
| 102 | + | |
100 | 103 |
| |
101 | 104 |
| |
102 | 105 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
| 131 | + | |
| 132 | + | |
132 | 133 |
| |
133 | 134 |
| |
134 | 135 |
| |
|
Lines changed: 0 additions & 22 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
13 | 12 |
| |
14 | 13 |
| |
15 | 14 |
| |
| |||
63 | 62 |
| |
64 | 63 |
| |
65 | 64 |
| |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 | 65 |
| |
70 | 66 |
| |
71 | 67 |
| |
| |||
208 | 204 |
| |
209 | 205 |
| |
210 | 206 |
| |
211 |
| - | |
212 |
| - | |
213 |
| - | |
214 | 207 |
| |
215 | 208 |
| |
216 | 209 |
| |
217 |
| - | |
218 |
| - | |
219 |
| - | |
220 |
| - | |
221 |
| - | |
222 |
| - | |
223 |
| - | |
224 |
| - | |
225 |
| - | |
226 |
| - | |
227 |
| - | |
228 |
| - | |
229 |
| - | |
230 |
| - | |
231 |
| - | |
232 | 210 |
| |
233 | 211 |
| |
234 | 212 |
| |
|
Lines changed: 76 additions & 34 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
38 | 38 |
| |
39 | 39 |
| |
40 | 40 |
| |
| 41 | + | |
| 42 | + | |
41 | 43 |
| |
42 | 44 |
| |
43 | 45 |
| |
| |||
54 | 56 |
| |
55 | 57 |
| |
56 | 58 |
| |
| 59 | + | |
57 | 60 |
| |
58 | 61 |
| |
59 | 62 |
| |
| |||
92 | 95 |
| |
93 | 96 |
| |
94 | 97 |
| |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
95 | 114 |
| |
96 | 115 |
| |
97 | 116 |
| |
| |||
103 | 122 |
| |
104 | 123 |
| |
105 | 124 |
| |
106 |
| - | |
107 |
| - | |
108 |
| - | |
109 |
| - | |
110 |
| - | |
111 |
| - | |
112 |
| - | |
113 | 125 |
| |
114 | 126 |
| |
115 | 127 |
| |
| |||
197 | 209 |
| |
198 | 210 |
| |
199 | 211 |
| |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
200 | 262 |
| |
201 | 263 |
| |
202 | 264 |
| |
| |||
306 | 368 |
| |
307 | 369 |
| |
308 | 370 |
| |
309 |
| - | |
| 371 | + | |
310 | 372 |
| |
| 373 | + | |
311 | 374 |
| |
312 | 375 |
| |
313 | 376 |
| |
| |||
352 | 415 |
| |
353 | 416 |
| |
354 | 417 |
| |
355 |
| - | |
| 418 | + | |
356 | 419 |
| |
357 | 420 |
| |
358 | 421 |
| |
| 422 | + | |
359 | 423 |
| |
360 | 424 |
| |
361 | 425 |
| |
| |||
389 | 453 |
| |
390 | 454 |
| |
391 | 455 |
| |
392 |
| - | |
| 456 | + | |
393 | 457 |
| |
394 | 458 |
| |
395 | 459 |
| |
| 460 | + | |
396 | 461 |
| |
397 | 462 |
| |
398 | 463 |
| |
| |||
689 | 754 |
| |
690 | 755 |
| |
691 | 756 |
| |
692 |
| - | |
693 |
| - | |
694 |
| - | |
695 |
| - | |
696 |
| - | |
697 |
| - | |
698 |
| - | |
699 |
| - | |
700 |
| - | |
701 |
| - | |
702 |
| - | |
703 |
| - | |
704 |
| - | |
705 |
| - | |
706 |
| - | |
707 |
| - | |
708 |
| - | |
709 |
| - | |
710 |
| - | |
711 |
| - | |
712 |
| - | |
713 |
| - | |
714 |
| - | |
715 |
| - | |
| 757 | + | |
716 | 758 |
|
Lines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
26 | 26 |
| |
27 | 27 |
| |
28 | 28 |
| |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 |
| |
30 | 38 |
| |
31 | 39 |
| |
| |||
262 | 270 |
| |
263 | 271 |
| |
264 | 272 |
| |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
265 | 277 |
| |
266 | 278 |
| |
267 | 279 |
| |
|
Lines changed: 4 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
238 | 238 |
| |
239 | 239 |
| |
240 | 240 |
| |
241 |
| - | |
242 |
| - | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
243 | 245 |
| |
244 | 246 |
| |
245 | 247 |
| |
|
0 commit comments
Comments
(0)