-
- Downloads
Don't use O_DIRECT when writing WAL files if archiving or streaming is
enabled. Bypassing the kernel cache is counter-productive in that case, because the archiver/walsender process will read from the WAL file soon after it's written, and if it's not cached the read will cause a physical read, eating I/O bandwidth available on the WAL drive. Also, walreceiver process does unaligned writes, so disable O_DIRECT in walreceiver process for that reason too.
Showing
- src/backend/access/transam/xlog.c 24 additions, 8 deletionssrc/backend/access/transam/xlog.c
- src/backend/replication/walreceiver.c 14 additions, 8 deletionssrc/backend/replication/walreceiver.c
- src/include/access/xlogdefs.h 6 additions, 9 deletionssrc/include/access/xlogdefs.h
- src/include/replication/walreceiver.h 3 additions, 1 deletionsrc/include/replication/walreceiver.h
Loading
Please register or sign in to comment