Re: Should vacuum process config file reload more often

From: Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Melanie Plageman <melanieplageman(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Amit Kapila <amit(dot)kapila16(at)gmail(dot)com>
Subject: Re: Should vacuum process config file reload more often
Date: 2023-04-17 02:04:22
Message-ID: CAD21AoBaBbLTejxYDpHg_oHhXO1RgzKTY1-qj8DjeWGcv9Fnbg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Apr 12, 2023 at 12:05 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
>
> On Fri, Apr 7, 2023 at 10:23 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> >
> > > On 7 Apr 2023, at 15:07, Melanie Plageman <melanieplageman(at)gmail(dot)com> wrote:
> > > On Fri, Apr 7, 2023 at 2:53 AM Masahiko Sawada <sawada(dot)mshk(at)gmail(dot)com> wrote:
> > >
> > > Definitely seems worth fixing as it kind of defeats the purpose of the
> > > original commit. I wish I had noticed before!
> > >
> > > Your fix has:
> > > !(avopts && (avopts->vacuum_cost_limit >= 0 ||
> > > avopts->vacuum_cost_delay >= 0));
> > >
> > > And though delay is required to be >= 0
> > > avopts->vacuum_cost_delay >= 0
> > >
> > > Limit does not. It can just be > 0.
> > >
> > > postgres=# create table foo (a int) with (autovacuum_vacuum_cost_limit = 0);
> > > ERROR: value 0 out of bounds for option "autovacuum_vacuum_cost_limit"
> > > DETAIL: Valid values are between "1" and "10000".
> > >
> > > Though >= is also fine, the rest of the code in all versions always
> > > checks if limit > 0 and delay >= 0 since 0 is a valid value for delay
> > > and not for limit. Probably best we keep it consistent (though the whole
> > > thing is quite confusing).
> >
> > +1
>
> +1. I misunderstood the initial value of autovacuum_vacuum_cost_limit reloption.

I've attached an updated patch for fixing at_dobalance condition.

Regards,

--
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment Content-Type Size
0001-Fix-the-condition-of-joining-autovacuum-workers-to-b.patch application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Richard Guo 2023-04-17 02:57:01 Re: Allowing parallel-safe initplans
Previous Message Tom Lane 2023-04-17 01:33:43 Re: longfin missing gssapi_ext.h