forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd91de0
committed
Remove temporary files after backend crash
After a crash of a backend using temporary files, the files used to beleft behind, on the basis that it might be useful for debugging. But wedon't have any reports of anyone actually doing that, and it means thedisk usage may grow over time due to repeated backend failures (possiblyeven hitting ENOSPC). So this behavior is a bit unfortunate, and fixingit required either manual cleanup (deleting files, which is error-prone)or restart of the instance (i.e. service disruption).This implements automatic cleanup of temporary files, controled by a newGUC remove_temp_files_after_crash. By default the files are removed, butit can be disabled to restore the old behavior if needed.Author: Euler TaveiraReviewed-by: Tomas Vondra, Michael Paquier, Anastasia Lubennikova, Thomas MunroDiscussion:https://postgr.es/m/CAH503wDKdYzyq7U-QJqGn%3DGm6XmoK%2B6_6xTJ-Yn5WSvoHLY1Ww%40mail.gmail.com1 parentda18d82 commitcd91de0
File tree
7 files changed
+233
-5
lines changed- doc/src/sgml
- src
- backend
- postmaster
- storage/file
- utils/misc
- include/postmaster
- test/recovery/t
7 files changed
+233
-5
lines changedLines changed: 17 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9671 | 9671 |
| |
9672 | 9672 |
| |
9673 | 9673 |
| |
| 9674 | + | |
| 9675 | + | |
| 9676 | + | |
| 9677 | + | |
| 9678 | + | |
| 9679 | + | |
| 9680 | + | |
| 9681 | + | |
| 9682 | + | |
| 9683 | + | |
| 9684 | + | |
| 9685 | + | |
| 9686 | + | |
| 9687 | + | |
| 9688 | + | |
| 9689 | + | |
| 9690 | + | |
9674 | 9691 |
| |
9675 | 9692 |
| |
9676 | 9693 |
| |
|
Lines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
| 245 | + | |
245 | 246 |
| |
246 | 247 |
| |
247 | 248 |
| |
| |||
3976 | 3977 |
| |
3977 | 3978 |
| |
3978 | 3979 |
| |
| 3980 | + | |
| 3981 | + | |
| 3982 | + | |
| 3983 | + | |
3979 | 3984 |
| |
3980 | 3985 |
| |
3981 | 3986 |
| |
|
Lines changed: 7 additions & 5 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3024 | 3024 |
| |
3025 | 3025 |
| |
3026 | 3026 |
| |
3027 |
| - | |
3028 |
| - | |
3029 |
| - | |
3030 |
| - | |
3031 |
| - | |
| 3027 | + | |
| 3028 | + | |
| 3029 | + | |
| 3030 | + | |
| 3031 | + | |
| 3032 | + | |
| 3033 | + | |
3032 | 3034 |
| |
3033 | 3035 |
| |
3034 | 3036 |
| |
|
Lines changed: 9 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1371 | 1371 |
| |
1372 | 1372 |
| |
1373 | 1373 |
| |
| 1374 | + | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
1374 | 1383 |
| |
1375 | 1384 |
| |
1376 | 1385 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
758 | 758 |
| |
759 | 759 |
| |
760 | 760 |
| |
| 761 | + | |
| 762 | + | |
761 | 763 |
| |
762 | 764 |
| |
763 | 765 |
| |
|
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
| 32 | + | |
32 | 33 |
| |
33 | 34 |
| |
34 | 35 |
| |
|
Lines changed: 192 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 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + |
0 commit comments
Comments
(0)