Re: Direct I/O
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Greg Stark <stark@mit.edu>
Cc: Thomas Munro <thomas.munro@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Robert Haas <robertmhaas@gmail.com>, Andrew Dunstan <andrew@dunslane.net>, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Christoph Berg <myon@debian.org>, mikael.kjellstrom@gmail.com, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-04-19T17:13:55Z
Lists: pgsql-hackers
Hi, On 2023-04-18 15:35:09 -0400, Greg Stark wrote: > On Mon, 17 Apr 2023 at 17:45, Thomas Munro <thomas.munro@gmail.com> wrote: > > It's something you'd > > opt into for a dedicated database server along with other carefully > > considered settings. It seems acceptable to me that if you set > > io_direct to a non-default setting on an unusual-for-a-database-server > > filesystem you might get errors screaming about inability to open > > files -- you'll just have to turn it back off again if it doesn't work > > for you. > > If the only solution is to turn it off perhaps the server should just > turn it off? I guess the problem is that the shared_buffers might be > set assuming it would be on? I am quite strongly opposed to that - silently (or with a log message, which practically is the same as silently) disabling performance relevant options like DIO is much more likely to cause problems, due to the drastically different performance characteristics you get. I can see us making it configurable to try using DIO though, but I am not convinced it's worth bothering with that. But we'll see. Greetings, Andres Freund
Commits
-
Rename hook functions for debug_io_direct to match variable name.
- 155c81463c26 16.0 landed
- 4f3514f201cf 17.0 landed
-
Rename io_direct to debug_io_direct.
- 319bae9a8da6 16.0 landed
-
Skip the 004_io_direct.pl test if a pre-flight check fails.
- 6ca8df2d6147 16.0 landed
-
Use higher wal_level for 004_io_direct.pl.
- 980e8879f54a 16.0 landed
-
Skip \password TAP test on old IPC::Run versions
- 2e57ffe12f6b 16.0 cited
-
Add io_direct setting (developer-only).
- d4e71df6d757 16.0 landed
-
Introduce PG_IO_ALIGN_SIZE and align all I/O buffers.
- faeedbcefd40 16.0 landed
-
Add palloc_aligned() to allow aligned memory allocations
- 439f61757f05 16.0 cited
-
initdb: When running CREATE DATABASE, use STRATEGY = WAL_COPY.
- ad43a413c4f7 15.0 cited