From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: integrate pg_upgrade analyze_new_cluster.sh into vacuumdb |
Date: | 2014-04-04 15:01:34 |
Message-ID: | 20140404150134.GG14419@alap3.anarazel.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2014-01-14 22:22:08 -0500, Peter Eisentraut wrote:
> + <listitem>
> + <para>
> + Only calculate statistics for use by the optimizer (no vacuum),
> + like <option>--analyze-only</option>. Run several stages of analyze
> + with different configuration settings, to produce usable statistics
> + faster.
> + </para>
> +
> + <para>
> + This option is useful to analyze a database that was newly populated
> + from a restored dump or by <command>pg_upgrade</command>. This option
> + will try to create some statistics as fast as possible, to make the
> + database usable, and then produce full statistics in the subsequent
> + stages.
> + </para>
> + </listitem>
> + </varlistentry>
> +
If it's intended to be useful independent from pg_upgrade, shouldn't
this document in how many stages it runs?
> + const char *stage_commands[] = {
> + "SET default_statistics_target=1; SET vacuum_cost_delay=0;",
> + "SET default_statistics_target=10; RESET vacuum_cost_delay;",
> + "RESET default_statistics_target;"
> + };
> + const char *stage_messages[] = {
> + gettext_noop("Generating minimal optimizer statistics (1 target)"),
> + gettext_noop("Generating medium optimizer statistics (10 targets)"),
> + gettext_noop("Generating default (full) optimizer statistics (100 targets?)")
> + };
Imo 100 shouldn't be listed here, as it's actually using the database's
default.
This whole thing won't work for relations with per-column statistics
targets btw...
Other than that, it looks fine to me. And certainly nicer than that
chain of shell/bat pg_upgrade used to output.
Greetings,
Andres Freund
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2014-04-04 15:06:16 | Re: [COMMITTERS] pgsql: In checkpoint, move the check for in-progress xacts out of criti |
Previous Message | Andreas Karlsson | 2014-04-04 14:50:36 | Re: GiST support for inet datatypes |