]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix vacuum_cost_delay check for balance calculation.
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 25 Apr 2023 11:54:10 +0000 (13:54 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Tue, 25 Apr 2023 11:54:10 +0000 (13:54 +0200)
commitb95f36f8613166171f221ef5f4cd6fb583605c91
treeca38937e4762b86a854fd1e7a06dc2cdf87cad4d
parentbfa691087eacc6e0fbf1a0d8ee392c3d2ff3cb34
Fix vacuum_cost_delay check for balance calculation.

Commit 1021bd6a89 excluded autovacuum workers from cost-limit balance
calculations when per-relation options were set.  The code checks for
limit and cost_delay being greater than zero, but since cost_delay can
be set to -1 the test needs to check for greater than or zero.

Backpatch to all supported branches since 1021bd6a89 was backpatched
all the way at the time.

Author: Masahiko Sawada <sawada.mshk@gmail.com>
Reviewed-by: Melanie Plageman <melanieplageman@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAD21AoBS7o6Ljt_vfqPQPf67AhzKu3fR0iqk8B=vVYczMugKMQ@mail.gmail.com
Backpatch-through: v11 (all supported branches)
src/backend/postmaster/autovacuum.c