Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Cc: Andres Freund <andres@anarazel.de>, Justin Pryzby <pryzby@telsasoft.com>, Masahiko Sawada <sawada.mshk@gmail.com>, Bharath Rupireddy <bharath.rupireddyforpostgres@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, Peter Geoghegan <pg@bowt.ie>, pgsql-hackers@postgresql.org, Robert Haas <robertmhaas@gmail.com>,
Melanie Plageman <melanieplageman@gmail.com>
Date: 2023-04-15T00:59:52Z
Lists: pgsql-hackers
Attachments
- fix_buffer_usage_limit_docs.patch (application/octet-stream) patch
On Fri, 14 Apr 2023 at 19:20, Peter Eisentraut <peter.eisentraut@enterprisedb.com> wrote: > > I came across these new options and had a little bit of trouble figuring > them out from the documentation. Maybe this could be polished a bit. > > vacuumdb --help says > > --buffer-usage-limit=BUFSIZE > > I can guess what a "SIZE" might be, but is "BUFSIZE" different from a > "SIZE"? Maybe simplify here. > > On the vacuumdb man page, the placeholder is > > <replaceable class="parameter">buffer_usage_limit</replaceable> > > which is yet another way of phrasing it. Maybe also use "size" here? > > The VACUUM man page says > > BUFFER_USAGE_LIMIT [ <replaceable ...>string</replaceable> ] > > which had me really confused. The detailed description later doesn't > give any further explanation of possible values, except that > <literal>0</literal> is apparently a possible value, which in my mind is > not a string. Then there is a link to guc-vacuum-buffer-usage-limit, > which lifts the mystery that this is really just an integer setting with > possible memory-size units, but it was really hard to figure that out > from the start! > > Moreover, on the VACUUM man page, right below BUFFER_USAGE_LIMIT, it > explains the different kinds of accepted values, and "string" wasn't > added there. Maybe also change this to "size" here and add an > explanation there what kinds of sizes are possible. > > Finally, the locations of the new options in the various documentation > places seems a bit random. The vacuumdb --help output and the man page > appear to be mostly alphabetical, so --buffer-usage-limit should be > after -a/--all. (Also note that right now the option isn't even in the > same place in the --help output versus the man page.) These are all valid points. I've attached a patch aiming to address each of them. > The order of the options on the VACUUM man page doesn't make any sense > anymore. This isn't really the fault of this patch, but maybe it's time > to do a fresh reordering there. Agreed, that likely wasn't a big problem say about 5 years ago when we had far fewer options, but the number has grown quite a bit since then. Right after I fix the points you've mentioned seems a good time to address that. David
Commits
-
Add unit to vacuum_buffer_usage_limit value in postgresql.conf.sample.
- b72f564d87d1 16.0 landed
-
Improve VACUUM/ANALYZE BUFFER_USAGE_LIMIT docs
- c0235013c13b 16.0 landed
-
Add --buffer-usage-limit option to vacuumdb
- ae78cae3be62 16.0 landed
-
Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option
- 1cbbee033857 16.0 landed
-
Move various prechecks from vacuum() into ExecVacuum()
- b9b125b9c143 16.0 landed
-
Always make a BufferAccessStrategy for ANALYZE
- bccd6908ca82 16.0 landed
-
Rename BufferAccessStrategyData.ring_size to nbuffers
- 8d928e3a9fe7 16.0 landed
-
Disable vacuum's use of a buffer access strategy during failsafe
- 4830f1024325 16.0 landed
-
Only make buffer strategy for vacuum when it's likely needed
- 32fbe0239b03 16.0 landed
-
Remove some global variables from vacuum.c
- 3f476c953495 16.0 landed
-
Doc: add Buffer Access Strategy to the glossary
- c8f8d0eb1868 16.0 landed