- Notifications
You must be signed in to change notification settings - Fork4.9k
Commit210622c
committed
Provide vectored variant of ReadBuffer().
Break ReadBuffer() up into two steps. StartReadBuffers() andWaitReadBuffers() give us two main advantages:1. Multiple consecutive blocks can be read with one system call.2. Advice (hints of future reads) can optionally be issued to thekernel ahead of time.The traditional ReadBuffer() function is now implemented in terms ofthose functions, to avoid duplication.A new GUC io_combine_limit is defined, and the functions for limitingper-backend pin counts are made into public APIs. Those are providedfor use by callers of StartReadBuffers(), when deciding how many buffersto read at once. The following commit will add a higher level mechanismfor doing that automatically with a practical interface.With some more infrastructure in later work, StartReadBuffers() couldbe extended to start real asynchronous I/O instead of just issuingadvice and leaving WaitReadBuffers() to do the work synchronously.Author: Thomas Munro <thomas.munro@gmail.com>Author: Andres Freund <andres@anarazel.de> (some optimization tweaks)Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>Reviewed-by: Heikki Linnakangas <hlinnaka@iki.fi>Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>Reviewed-by: Dilip Kumar <dilipbalaut@gmail.com>Reviewed-by: Andres Freund <andres@anarazel.de>Tested-by: Tomas Vondra <tomas.vondra@enterprisedb.com>Discussion:https://postgr.es/m/CA+hUKGJkOiOCa+mag4BF+zHo7qo=o9CFheB8=g6uT5TUm2gkvA@mail.gmail.com1 parent13b3b62 commit210622c
File tree
7 files changed
+605
-221
lines changed- doc/src/sgml
- src
- backend
- storage/buffer
- utils/misc
- include/storage
- tools/pgindent
7 files changed
+605
-221
lines changedLines changed: 14 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2708 | 2708 |
| |
2709 | 2709 |
| |
2710 | 2710 |
| |
| 2711 | + | |
| 2712 | + | |
| 2713 | + | |
| 2714 | + | |
| 2715 | + | |
| 2716 | + | |
| 2717 | + | |
| 2718 | + | |
| 2719 | + | |
| 2720 | + | |
| 2721 | + | |
| 2722 | + | |
| 2723 | + | |
| 2724 | + | |
2711 | 2725 |
| |
2712 | 2726 |
| |
2713 | 2727 |
| |
|
0 commit comments
Comments
(0)