forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3f8c98d
committed
pg_archivecleanup: Add --clean-backup-history
By default, pg_archivecleanup does not remove backup history files.These are just few bytes useful for debugging purposes, still keepingthem around can bloat an archive path history files mixed with the WALsegments if the path has a long history.This patch adds a new option to control if backup history files areremoved, depending on the oldest segment name to keep around.While on it, the TAP tests are refactored so as these are now able tohandle lists of files. Each file has a flag to track if it should stillexist or not depending on the oldest segment defined with the commandrun.Author: Atsushi TorikoshiReviewed-by: Kyotaro Horiguchi, Fujii Masao, Michael PaquierDiscussion:https://postgr.es/m/d660ef741ce3d82f3b4283f1cafd576c@oss.nttdata.com1 parent4a7556f commit3f8c98d
File tree
3 files changed
+115
-38
lines changed- doc/src/sgml/ref
- src/bin/pg_archivecleanup
- t
3 files changed
+115
-38
lines changedLines changed: 12 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
93 | 93 |
| |
94 | 94 |
| |
95 | 95 |
| |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
96 | 108 |
| |
97 | 109 |
| |
98 | 110 |
| |
|
Lines changed: 16 additions & 7 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
23 | 23 |
| |
24 | 24 |
| |
25 | 25 |
| |
| 26 | + | |
| 27 | + | |
26 | 28 |
| |
27 | 29 |
| |
28 | 30 |
| |
| |||
104 | 106 |
| |
105 | 107 |
| |
106 | 108 |
| |
107 |
| - | |
108 |
| - | |
109 |
| - | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
110 | 113 |
| |
111 | 114 |
| |
112 | 115 |
| |
113 | 116 |
| |
114 | 117 |
| |
115 |
| - | |
116 |
| - | |
| 118 | + | |
| 119 | + | |
117 | 120 |
| |
118 |
| - | |
| 121 | + | |
| 122 | + | |
119 | 123 |
| |
120 | 124 |
| |
121 | 125 |
| |
| |||
256 | 260 |
| |
257 | 261 |
| |
258 | 262 |
| |
| 263 | + | |
259 | 264 |
| |
260 | 265 |
| |
261 | 266 |
| |
| |||
281 | 286 |
| |
282 | 287 |
| |
283 | 288 |
| |
| 289 | + | |
284 | 290 |
| |
285 | 291 |
| |
286 | 292 |
| |
| |||
306 | 312 |
| |
307 | 313 |
| |
308 | 314 |
| |
309 |
| - | |
| 315 | + | |
310 | 316 |
| |
311 | 317 |
| |
312 | 318 |
| |
| 319 | + | |
| 320 | + | |
| 321 | + | |
313 | 322 |
| |
314 | 323 |
| |
315 | 324 |
| |
|
Lines changed: 87 additions & 31 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 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
18 | 34 |
| |
19 | 35 |
| |
20 | 36 |
| |
21 |
| - | |
| 37 | + | |
22 | 38 |
| |
23 | 39 |
| |
| 40 | + | |
24 | 41 |
| |
25 | 42 |
| |
26 | 43 |
| |
27 | 44 |
| |
28 | 45 |
| |
29 | 46 |
| |
30 |
| - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
31 | 55 |
| |
32 | 56 |
| |
33 | 57 |
| |
| |||
54 | 78 |
| |
55 | 79 |
| |
56 | 80 |
| |
| 81 | + | |
| 82 | + | |
57 | 83 |
| |
58 |
| - | |
| 84 | + | |
| 85 | + | |
59 | 86 |
| |
| 87 | + | |
60 | 88 |
| |
61 | 89 |
| |
62 |
| - | |
| 90 | + | |
63 | 91 |
| |
64 | 92 |
| |
65 |
| - | |
66 |
| - | |
67 |
| - | |
68 |
| - | |
69 |
| - | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
70 | 112 |
| |
71 | 113 |
| |
72 | 114 |
| |
| 115 | + | |
| 116 | + | |
73 | 117 |
| |
74 | 118 |
| |
75 | 119 |
| |
76 | 120 |
| |
77 | 121 |
| |
78 | 122 |
| |
79 |
| - | |
| 123 | + | |
80 | 124 |
| |
81 |
| - | |
| 125 | + | |
82 | 126 |
| |
83 | 127 |
| |
84 |
| - | |
85 |
| - | |
86 |
| - | |
87 |
| - | |
| 128 | + | |
88 | 129 |
| |
89 | 130 |
| |
90 |
| - | |
91 |
| - | |
92 |
| - | |
93 |
| - | |
94 |
| - | |
95 |
| - | |
96 |
| - | |
97 |
| - | |
98 |
| - | |
99 |
| - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
100 | 146 |
| |
101 | 147 |
| |
102 | 148 |
| |
103 |
| - | |
104 |
| - | |
105 |
| - | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
106 | 162 |
| |
107 | 163 |
|
0 commit comments
Comments
(0)