zulip/scripts/setup
Alex Vandiver f77bbd3323 upgrade-postgresql: Switch to vacuumdb --all --analzyze-only --jobs 10.
The `analyze_new_cluster.sh` script output by `pg_upgrade` just runs
`vacuumdb --all --analyze-in-stages`, which runs three passes over the
database, getting better stats each time.  Each of these passes is
independent; the third pass does not require the first two.
`--analyze-in-stages` is only provided to get "something" into the
database, on the theory that it could then be started and used.  Since
we wait for all three passes to complete before starting the database,
the first two passes add no value.

Additionally, PosttgreSQL 14 and up stop writing the
`analyze_new_cluster.sh` script as part of `pg_upgrade`, suggesting
the equivalent `vacuumdb --all --analyze-in-stages` call instead.

Switch to explicitly call `vacuumdb --all --analyze-only`, since we do
not gain any benefit from `--analyze-in-stages`.  We also enable
parallelism, with `--jobs 10`, in order to analyze up to 10 tables in
parallel.  This may increase load, but will accelerate the upgrade
process.
2021-11-08 18:21:46 -08:00
..
apt-repos scripts: Use curl -f (--fail). 2021-07-13 16:47:49 -07:00
__init__.py setup: Add missing __init__.py. 2021-07-05 12:20:39 -07:00
compare-settings-to-template python: Remove default "utf8" argument for encode(), decode(). 2021-08-02 15:53:52 -07:00
configure-rabbitmq configure-rabbitmq: Wait for RabbitMQ to start up. 2020-10-15 17:01:00 -07:00
create-db.sql create-db: Default dbuser and dbname to zulip. 2021-05-26 17:19:11 -07:00
create-pgroonga.sql postgres-create-db: Split into non-pgroonga and pgroonga scripts. 2019-07-17 16:18:22 -07:00
flush-memcached memcached: Switch from pylibmc to python-binary-memcached. 2020-08-06 12:51:14 -07:00
generate_secrets.py settings: Support arbitrary database user and dbname. 2021-05-25 13:46:58 -07:00
generate-self-signed-cert shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
initialize-database docs: Add missing space to compound verbs “log in”, “set up”, etc. 2021-04-26 09:31:08 -07:00
inline_email_css.py python: Remove locally dead code. 2021-08-19 01:51:37 -07:00
install install: Use a period at end of root error message. 2021-06-23 08:42:46 -07:00
postgresql-init-db postgresql-init-db: Support arbitrary database user and dbname. 2021-05-25 13:56:04 -07:00
reindex-textual-data reindex-textual-data: Provide a tool to reindex all text indices. 2021-07-19 16:34:23 -07:00
restore-backup python: Reformat with Black, except quotes. 2021-02-12 13:11:19 -08:00
setup-certbot shfmt: Reformat shell scripts with shfmt. 2020-10-15 15:16:00 -07:00
sha256-tarball-to scripts: Use curl -f (--fail). 2021-07-13 16:47:49 -07:00
terminate-psql-sessions terminate-psql-sessions: Rely on the caller to set PGHOST, PGUSER. 2020-06-15 21:37:14 -07:00
upgrade-postgresql upgrade-postgresql: Switch to vacuumdb --all --analzyze-only --jobs 10. 2021-11-08 18:21:46 -08:00