- Notifications
You must be signed in to change notification settings - Fork28
Commit285bd0a
committed
Remove unnecessary memcpy when reading WAL record fitting on page
When reading a WAL record, its contents are copied into an intermediatebuffer. However, doing so is not necessary if the record fits fullyinto the current page, saving one memcpy for each such record. Theallocation handling of the intermediate buffer is also now done onlywhen a record crosses a page boundary, shaving some extra cycles whenreading a WAL record.Author: Andrey LepikhovReviewed-by: Kyotaro Horiguchi, Heikki LinnakangasDiscussion:https://postgr.es/m/c2ea54dd-a1d3-80eb-ddbf-7e6f258e615e@postgrespro.ru1 parent79376e0 commit285bd0a
2 files changed
+13
-17
lines changedLines changed: 0 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4203 | 4203 |
| |
4204 | 4204 |
| |
4205 | 4205 |
| |
4206 |
| - | |
4207 |
| - | |
4208 |
| - | |
4209 | 4206 |
| |
4210 | 4207 |
| |
4211 | 4208 |
| |
|
Lines changed: 13 additions & 14 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
353 | 353 |
| |
354 | 354 |
| |
355 | 355 |
| |
356 |
| - | |
357 |
| - | |
358 |
| - | |
359 |
| - | |
360 |
| - | |
361 |
| - | |
362 |
| - | |
363 |
| - | |
364 |
| - | |
365 |
| - | |
366 |
| - | |
367 |
| - | |
368 |
| - | |
369 | 356 |
| |
370 | 357 |
| |
371 | 358 |
| |
| |||
375 | 362 |
| |
376 | 363 |
| |
377 | 364 |
| |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
378 | 378 |
| |
379 | 379 |
| |
380 | 380 |
| |
| |||
479 | 479 |
| |
480 | 480 |
| |
481 | 481 |
| |
482 |
| - | |
483 | 482 |
| |
484 | 483 |
| |
485 | 484 |
| |
|
0 commit comments
Comments
(0)