- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitce6a71f
committed
Use vectored I/O to fill new WAL segments.
Instead of making many block-sized write() calls to fill a new WAL filewith zeroes, make a smaller number of pwritev() calls (or variousemulations). The actual number depends on the OS's IOV_MAX, whichPG_IOV_MAX currently caps at 32. That means we'll write 256kB per callon typical systems. We may want to tune the number later with moreexperience.Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>Reviewed-by: Andres Freund <andres@anarazel.de>Discussion:https://postgr.es/m/CA%2BhUKGJA%2Bu-220VONeoREBXJ9P3S94Y7J%2BkqCnTYmahvZJwM%3Dg%40mail.gmail.com1 parent13a021f commitce6a71f
1 file changed
+22
-6
lines changedLines changed: 22 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| 51 | + | |
51 | 52 |
| |
52 | 53 |
| |
53 | 54 |
| |
| |||
3270 | 3271 |
| |
3271 | 3272 |
| |
3272 | 3273 |
| |
3273 |
| - | |
3274 | 3274 |
| |
3275 | 3275 |
| |
3276 | 3276 |
| |
| |||
3317 | 3317 |
| |
3318 | 3318 |
| |
3319 | 3319 |
| |
| 3320 | + | |
| 3321 | + | |
| 3322 | + | |
3320 | 3323 |
| |
3321 | 3324 |
| |
3322 | 3325 |
| |
| |||
3326 | 3329 |
| |
3327 | 3330 |
| |
3328 | 3331 |
| |
3329 |
| - | |
| 3332 | + | |
| 3333 | + | |
| 3334 | + | |
3330 | 3335 |
| |
3331 |
| - | |
3332 |
| - | |
| 3336 | + | |
| 3337 | + | |
| 3338 | + | |
| 3339 | + | |
| 3340 | + | |
| 3341 | + | |
| 3342 | + | |
| 3343 | + | |
| 3344 | + | |
| 3345 | + | |
| 3346 | + | |
| 3347 | + | |
3333 | 3348 |
| |
3334 |
| - | |
3335 |
| - | |
| 3349 | + | |
3336 | 3350 |
| |
3337 | 3351 |
| |
| 3352 | + | |
| 3353 | + | |
3338 | 3354 |
| |
3339 | 3355 |
| |
3340 | 3356 |
| |
|
0 commit comments
Comments
(0)