Re: Statistics improvements for time series data

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Mark Dilger <hornschnorter(at)gmail(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Statistics improvements for time series data
Date: 2019-12-10 18:40:39
Message-ID: CA+TgmoYoTkdFhi8OSaqO1T54joQocWJT+xMkWHAp1afmy4mR1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Dec 8, 2019 at 7:12 PM Mark Dilger <hornschnorter(at)gmail(dot)com> wrote:
> I think the words "IF AND ONLY IF AUTOVACUUM WOULD" should be
> replaced with a single word and added to the grammar where
> vacuum_option_elem lists VERBOSE, FREEZE and FULL. Perhaps
> "OPTIONALLY", or "AUTOVACUUMESQUE", though I'm really hoping
> somebody has a better suggestion.

vacuum_option_elem doesn't exist any more, since commit
6776142a07afb4c28961f27059d800196902f5f1.

I think OPTIONALLY would be a fine keyword:

VACUUM (OPTIONALLY) my_table;
ANALYZE (OPTIONALLY) my_table;

It wouldn't even need to be a parser keyword; see
disable_page_skipping for a comparable.

> In the given example, above, the user would likely set the vacuum
> and analyze scale factors to zero and the thresholds to something
> they've empirically determined to work well for their purposes.
> That might be a problem in practice, given that it also impacts
> autovacuum's choices. Would people prefer that those thresholds
> be passed as parameters to the command directly?
>
> VACUUM sometable OPTIONALLY (vacuum_threshold = 10, vacuum_scale = 0)
>
> and only default to autovacuum's settings when not specified?

I think that syntax is a non-starter. We should try to fit into the
existing mold for vacuum options. But I don't see a reason why we
couldn't allow:

VACUUM (OPTIONALLY, THRESHOLD 10, SCALE 0) my_table;

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Ashwin Agrawal 2019-12-10 18:40:53 Re: Start Walreceiver completely before shut down it on standby server.
Previous Message Robert Haas 2019-12-10 18:32:03 Re: disable only nonparallel seq scan.