Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option

From: Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com>
To: drowley(at)postgresql(dot)org
Cc: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option
Date: 2023-04-11 03:02:38
Message-ID: 20230411.120238.1102085277698061857.horikyota.ntt@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

I apologize for writing mails in such a sporadic manner..

At Tue, 11 Apr 2023 10:23:35 +0900 (JST), Kyotaro Horiguchi <horikyota(dot)ntt(at)gmail(dot)com> wrote in
> Hello.
>
> > Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option
>
> This commit added the following error message.
>
> > errmsg("value: \"%s\": is invalid for buffer_usage_limit",
>
> It looks as the follows on terminal.
>
> postgres=# vacuum (buffer_usage_limit 'x');
> ERROR: value: "x": is invalid for buffer_usage_limit
>
> I'm not sure why the message has two colons. [1] talks about the
> message but doesn't really explain the reason for this.
>
> [1] https://www.postgresql.org/message-id/CAApHDvqs%2BFcw9Yrn4ORCAX0xKK1-SiCC0w1j7Dhg%3DG9hrvag7g%40mail.gmail.com

vacuum.c:198
> if (opt->arg == NULL)
> {
> ereport(ERROR,
> (errcode(ERRCODE_SYNTAX_ERROR),
> errmsg("buffer_usage_limit option requires a valid value"),
> parser_errposition(pstate, opt->location)));

> postgres=# vacuum (buffer_usage_limit);
> ERROR: buffer_usage_limit requires a valid value

The error message doesn't really make much sense to me. In the same
context, most of the code seems to use ("%s requires a parameter",
buffer_usage_limit) without "valid".

vacuum.c:347
> errmsg("BUFFER_USAGE_LIMIT cannot be specified for VACUUM FULL")));

It seems like that the vacuum options are usually spelled in uppercase
at least for vacuum and analyze. In any case, shouldn't we need to
unify them in a certain area? (For example, command options for
CREATE SUBSCRIPTION is shown in lowercase in the documentation. But,
I'm not exactly sure what we should do about it.)

regards.

--
Kyotaro Horiguchi
NTT Open Source Software Center

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2023-04-11 03:02:53 Re: pgsql: Allow logical decoding on standbys
Previous Message David Rowley 2023-04-11 01:59:36 Re: pgsql: Add VACUUM/ANALYZE BUFFER_USAGE_LIMIT option