forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit9b17855
committed
Per previous discussions, get rid of use of sync(2) in favor of
explicitly fsync'ing every (non-temp) file we have written since thelast checkpoint. In the vast majority of cases, the burden of thefsyncs should fall on the bgwriter process not on backends. (To thisend, we assume that an fsync issued by the bgwriter will force outblocks written to the same file by other processes using other filedescriptors. Anyone have a problem with that?) This makes the worldsafe for WIN32, which ain't even got sync(2), and really makes the worldsafe for Unixen as well, because sync(2) never had the semantics we need:it offers no way to wait for the requested I/O to finish.Along the way, fix a bug I recently introduced in xlog recovery:file truncation replay failed to clear bufmgr buffers for the droppedblocks, which could result in 'PANIC: heap_delete_redo: no block'later on in xlog replay.1 parentf024086 commit9b17855
13 files changed
+766
-237
lines changedLines changed: 13 additions & 13 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 |
| - | |
| 16 | + | |
17 | 17 |
| |
18 | 18 |
| |
19 | 19 |
| |
| |||
97 | 97 |
| |
98 | 98 |
| |
99 | 99 |
| |
100 |
| - | |
| 100 | + | |
101 | 101 |
| |
102 | 102 |
| |
103 | 103 |
| |
| |||
110 | 110 |
| |
111 | 111 |
| |
112 | 112 |
| |
113 |
| - | |
| 113 | + | |
114 | 114 |
| |
115 | 115 |
| |
116 | 116 |
| |
| |||
128 | 128 |
| |
129 | 129 |
| |
130 | 130 |
| |
131 |
| - | |
| 131 | + | |
132 | 132 |
| |
133 | 133 |
| |
134 | 134 |
| |
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 |
| - | |
| 138 | + | |
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| |||
169 | 169 |
| |
170 | 170 |
| |
171 | 171 |
| |
172 |
| - | |
| 172 | + | |
173 | 173 |
| |
174 | 174 |
| |
175 | 175 |
| |
176 | 176 |
| |
177 | 177 |
| |
178 |
| - | |
| 178 | + | |
179 | 179 |
| |
180 | 180 |
| |
181 |
| - | |
| 181 | + | |
182 | 182 |
| |
183 | 183 |
| |
184 | 184 |
| |
| |||
256 | 256 |
| |
257 | 257 |
| |
258 | 258 |
| |
259 |
| - | |
| 259 | + | |
260 | 260 |
| |
261 | 261 |
| |
262 | 262 |
| |
263 | 263 |
| |
264 |
| - | |
| 264 | + | |
265 | 265 |
| |
266 | 266 |
| |
267 | 267 |
| |
| |||
351 | 351 |
| |
352 | 352 |
| |
353 | 353 |
| |
354 |
| - | |
| 354 | + | |
355 | 355 |
| |
356 | 356 |
| |
357 |
| - | |
| 357 | + | |
358 | 358 |
| |
359 | 359 |
| |
360 |
| - | |
| 360 | + | |
361 | 361 |
| |
362 | 362 |
| |
363 | 363 |
| |
|
0 commit comments
Comments
(0)