- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit644a0a6
committed
Fix archive_cleanup_command.
When I moved ExecuteRecoveryCommand() from xlog.c to xlogarchive.c, I didn'trealize that it's called from the checkpoint process, not the startupprocess. I tried to use InRedo variable to decide whether or not to attemptcleaning up the archive (must not do so before we have read the initialcheckpoint record), but that variable is only valid within the startupprocess.Instead, let ExecuteRecoveryCommand() always clean up the archive, and addan explicit argument to RestoreArchivedFile() to say whether that's allowedor not. The caller knows better.Reported by Erik Rijkers, diagnosis by Fujii Masao. Only 9.3devel isaffected.1 parentb6e3798 commit644a0a6
File tree
4 files changed
+25
-34
lines changed- src
- backend/access/transam
- include/access
4 files changed
+25
-34
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
67 |
| - | |
| 67 | + | |
68 | 68 |
| |
69 | 69 |
| |
70 | 70 |
| |
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
| 156 | + | |
157 | 157 |
| |
158 | 158 |
| |
159 | 159 |
| |
| |||
257 | 257 |
| |
258 | 258 |
| |
259 | 259 |
| |
260 |
| - | |
| 260 | + | |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
|
Lines changed: 8 additions & 24 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2588 | 2588 |
| |
2589 | 2589 |
| |
2590 | 2590 |
| |
2591 |
| - | |
| 2591 | + | |
| 2592 | + | |
2592 | 2593 |
| |
2593 | 2594 |
| |
2594 | 2595 |
| |
| |||
9051 | 9052 |
| |
9052 | 9053 |
| |
9053 | 9054 |
| |
9054 |
| - | |
9055 |
| - | |
9056 |
| - | |
9057 |
| - | |
9058 |
| - | |
9059 |
| - | |
9060 |
| - | |
9061 |
| - | |
9062 |
| - | |
9063 |
| - | |
9064 |
| - | |
| 9055 | + | |
| 9056 | + | |
9065 | 9057 |
| |
9066 | 9058 |
| |
9067 | 9059 |
| |
9068 | 9060 |
| |
9069 |
| - | |
9070 |
| - | |
9071 |
| - | |
9072 |
| - | |
9073 |
| - | |
9074 |
| - | |
9075 |
| - | |
9076 |
| - | |
9077 |
| - | |
9078 |
| - | |
9079 |
| - | |
9080 |
| - | |
| 9061 | + | |
| 9062 | + | |
| 9063 | + | |
| 9064 | + | |
9081 | 9065 |
| |
9082 | 9066 |
| |
9083 | 9067 |
| |
|
Lines changed: 12 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
41 | 41 |
| |
42 | 42 |
| |
43 | 43 |
| |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 |
| |
45 | 49 |
| |
46 | 50 |
| |
47 |
| - | |
| 51 | + | |
| 52 | + | |
48 | 53 |
| |
49 | 54 |
| |
50 | 55 |
| |
| |||
113 | 118 |
| |
114 | 119 |
| |
115 | 120 |
| |
116 |
| - | |
117 |
| - | |
118 |
| - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
119 | 125 |
| |
120 | 126 |
| |
121 | 127 |
| |
| |||
124 | 130 |
| |
125 | 131 |
| |
126 | 132 |
| |
127 |
| - | |
128 |
| - | |
| 133 | + | |
129 | 134 |
| |
| 135 | + | |
130 | 136 |
| |
131 | 137 |
| |
132 | 138 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
243 | 243 |
| |
244 | 244 |
| |
245 | 245 |
| |
246 |
| - | |
| 246 | + | |
| 247 | + | |
247 | 248 |
| |
248 | 249 |
| |
249 | 250 |
| |
|
0 commit comments
Comments
(0)