Re: increasing the default WAL segment size
Stephen Frost <sfrost@snowman.net>
Robert, * Robert Haas (robertmhaas@gmail.com) wrote: > Meanwhile, we'll significantly help people who are currently > generating painfully large but not totally insane numbers of WAL > segments. Someone who is currently generating 32,768 WAL segments per > day - about one every 2.6 seconds - will have a significantly easier > time if they start generating 8,192 WAL segments per day - about one > every 10.5 seconds - instead. It's just much easier for a reasonably > simple archive command to keep up, "ls" doesn't have as many directory > entries to sort, etc. I'm generally on-board with increasing the WAL segment size, and I can see the point that we might want to make it more easily configurable as it's valuable to set it differently on a small database vs. a large database, but I take exception with the notion that a "simple archive command" is ever appropriate. Heikki's excellent talk at PGCon '15 (iirc) goes over why our archive command example is about as terrible as you can get and that's primairly because it's just a simple 'cp'. archive_command needs to be doing things like fsync'ing the WAL file after it's been copied away, probably fsync'ing the directory the WAL file has been copied into, returning the correct exit code to PG, etc. Thankfully, there are backup/WAL archive utilities which do this correctly and are even built to handle a large rate of WAL files for high transaction systems (including keeping open a long-running ssh/TCP to address the startup costs of both). Switching to 64MB would still be nice to simply reduce the number of files you have to deal with, and I'm all for it for that reason, but the ssh/TCP startup cost reasons aren't good ones for the switch as people shouldn't be using a "simple" command anyway and the good tools for WAL archiving have already addressed those issues. Thanks! Stephen
Commits
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Make WAL segment size configurable at initdb time.
- fc49e24fa69a 11.0 landed
-
Perform only one ReadControlFile() during startup.
- 8356753c212a 11.0 landed
-
Introduce BYTES unit for GUCs.
- 6e7baa322773 11.0 landed
-
Remove useless duplicate inclusions of system header files.
- 9e3755ecb2d0 10.0 cited
-
Refactor other replication commands to use DestRemoteSimple.
- bbd8550bce14 10.0 landed
-
Add a SHOW command to the replication command language.
- d1ecd539477f 10.0 landed
-
Add a new DestReceiver for printing tuples without catalog access.
- a84069d93504 10.0 landed
-
Support fls().
- 4f658dc851a7 9.2.0 cited
-
Extend yesterday's patch making BLCKSZ and RELSEG_SIZE configurable to also
- cf9f6c8d8e9d 8.4.0 cited
-
Commit the reasonably uncontroversial parts of J.R. Nield's PITR patch, to
- c3c09be34b6b 8.0.0 cited
-
XLOG (also known as WAL -:)) Bootstrap/Startup/Shutdown.
- 47937403676d 7.1.1 cited
-
Transaction log manager core code.
- 30659d43eb73 7.1.1 cited