Re: Should vacuum process config file reload more often
Melanie Plageman <melanieplageman@gmail.com>
From: Melanie Plageman <melanieplageman@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Masahiko Sawada <sawada.mshk@gmail.com>, Daniel Gustafsson <daniel@yesql.se>,
Kyotaro Horiguchi <horikyota.ntt@gmail.com>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>, amit.kapila16@gmail.com
Date: 2023-04-03T22:35:07Z
Lists: pgsql-hackers
Attachments
- v14-0003-Autovacuum-refreshes-cost-based-delay-params-mor.patch (text/x-patch) patch v14-0003
- v14-0004-VACUUM-reloads-config-file-more-often.patch (text/x-patch) patch v14-0004
- v14-0002-Separate-vacuum-cost-variables-from-gucs.patch (text/x-patch) patch v14-0002
- v14-0001-Make-vacuum-s-failsafe_active-a-global.patch (text/x-patch) patch v14-0001
On Mon, Apr 3, 2023 at 3:08 PM Andres Freund <andres@anarazel.de> wrote: > On 2023-04-03 14:43:14 -0400, Tom Lane wrote: > > Melanie Plageman <melanieplageman@gmail.com> writes: > > > v13 attached with requested updates. > > > > I'm afraid I'd not been paying any attention to this discussion, > > but better late than never. I'm okay with letting autovacuum > > processes reload config files more often than now. However, > > I object to allowing ProcessConfigFile to be called from within > > commands in a normal user backend. The existing semantics are > > that user backends respond to SIGHUP only at the start of processing > > a user command, and I'm uncomfortable with suddenly deciding that > > that can work differently if the command happens to be VACUUM. > > It seems unprincipled and perhaps actively unsafe. > > I think it should be ok in commands like VACUUM that already internally start > their own transactions, and thus require to be run outside of a transaction > and at the toplevel. I share your concerns about allowing config reload in > arbitrary places. While we might want to go there, it would require a lot more > analysis. As an alternative for your consideration, attached v14 set implements the config file reload for autovacuum only (in 0003) and then enables it for VACUUM and ANALYZE not in a nested transaction command (in 0004). Previously I had the commits in the reverse order for ease of review (to separate changes to worker limit balancing logic from config reload code). - Melanie
Commits
-
Fix assertion failure in heap_vacuum_rel
- 4a6603cd4650 16.0 landed
-
Fix vacuum_cost_delay check for balance calculation.
- cba3c8f6dd7f 12.15 landed
- bfac8f8bc4a4 16.0 landed
- b95f36f86131 13.11 landed
- 0e8e5e856cc3 14.8 landed
- 0319b306e87e 15.3 landed
- 0151d2c5f256 11.20 landed
-
Fix autovacuum cost debug logging
- a9781ae11ba2 16.0 landed
-
Refresh cost-based delay params more frequently in autovacuum
- 7d71d3dd080b 16.0 landed
-
Separate vacuum cost variables from GUCs
- a85c60a945ac 16.0 landed
-
Make vacuum failsafe_active globally visible
- 71a825194fd3 16.0 landed
-
Don't balance vacuum cost delay when per-table settings are in effect
- 1021bd6a89bc 9.5.0 cited