diff options
author | Thomas Munro <tmunro@postgresql.org> | 2021-01-11 14:41:39 +1300 |
---|---|---|
committer | Thomas Munro <tmunro@postgresql.org> | 2021-01-11 15:28:31 +1300 |
commit | ce6a71fa5300cf00adf32c9daee302c523609709 (patch) | |
tree | 92c4f0d4839986e7434efad1879289133e166372 /src/interfaces/libpq/fe-auth.c | |
parent | 13a021f3e8c99915b3cc0cb2021a948d9c71ff32 (diff) | |
download | postgresql-ce6a71fa5300cf00adf32c9daee302c523609709.tar.gz postgresql-ce6a71fa5300cf00adf32c9daee302c523609709.zip |
Use vectored I/O to fill new WAL segments.
Instead of making many block-sized write() calls to fill a new WAL file
with zeroes, make a smaller number of pwritev() calls (or various
emulations). The actual number depends on the OS's IOV_MAX, which
PG_IOV_MAX currently caps at 32. That means we'll write 256kB per call
on typical systems. We may want to tune the number later with more
experience.
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.com
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
0 files changed, 0 insertions, 0 deletions