postgres/src
Thomas Munro 06fb5612c9 Increase io_combine_limit range to 1MB.
The default of 128kB is unchanged, but the upper limit is changed from
32 blocks to 128 blocks, unless the operating system's IOV_MAX is too
low.  Some other RDBMSes seem to cap their multi-block buffer pool I/O
around this number, and it seems useful to allow experimentation.

The concrete change is to our definition of PG_IOV_MAX, which provides
the maximum for io_combine_limit and io_max_combine_limit.  It also
affects a couple of other places that work with arrays of struct iovec
or smaller objects on the stack, so we still don't want to use the
system IOV_MAX directly without a clamp: it is not under our control and
likely to be 1024.  128 seems acceptable for our current usage.

For Windows, we can't use real scatter/gather yet, so we continue to
define our own IOV_MAX value of 16 and emulate preadv()/pwritev() with
loops.  Someone would need to research the trade-offs of raising that
number.

NB if trying to see this working: you might temporarily need to hack
BAS_BULKREAD to be bigger, since otherwise the obvious way of "a very
big SELECT" is limited by that for now.

Suggested-by: Tomas Vondra <tomas@vondra.me>
Discussion: https://postgr.es/m/CA%2BhUKG%2B2T9p-%2BzM6Eeou-RAJjTML6eit1qn26f9twznX59qtCA%40mail.gmail.com
2025-03-19 15:40:35 +13:00
..
backend Increase io_combine_limit range to 1MB. 2025-03-19 15:40:35 +13:00
bin Update guidance for running vacuumdb after pg_upgrade. 2025-03-18 16:32:56 -05:00
common Fix headerscheck warning. 2025-03-18 08:37:07 -07:00
fe_utils pg_rewind: Add dbname to primary_conninfo when using --write-recovery-conf. 2025-03-12 16:56:04 -07:00
include Increase io_combine_limit range to 1MB. 2025-03-19 15:40:35 +13:00
interfaces Apply more consistent style for command options in TAP tests 2025-03-17 12:42:23 +09:00
makefiles Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
pl Activate Python "Limited API" in PL/Python 2025-03-14 08:57:02 +01:00
port Assert that wrapper_handler()'s argument is within expected range. 2025-03-07 15:23:09 -06:00
template thread-safety: gmtime_r(), localtime_r() 2024-08-23 07:43:04 +02:00
test Fix assertion failure in parallel vacuum with minimal maintenance_work_mem setting. 2025-03-18 16:37:02 -07:00
timezone pg_noreturn to replace pg_attribute_noreturn() 2025-03-13 12:37:26 +01:00
tools aio: Add io_method=worker 2025-03-18 11:54:01 -04:00
tutorial Doc: simplify the tutorial's window-function examples. 2025-01-21 14:43:21 -05:00
.gitignore
DEVELOPERS
Makefile
Makefile.global.in Add support for OAUTHBEARER SASL mechanism 2025-02-20 16:25:17 +01:00
Makefile.shlib
meson.build Update copyright for 2025 2025-01-01 11:21:55 -05:00
nls-global.mk