vacuumdb fails with timeout during pg-upgrade
Summary
During pg-upgrade
run got STDERR: vacuumdb: vacuuming of database "gitlabhq_production" failed: ERROR: canceling statement due to statement timeout
Tried to work around by running sudo su - gitlab-psql -c "/opt/gitlab/embedded/postgresql/11/bin/vacuumdb --all --analyze-in-stages -h /var/opt/gitlab/postgresql"
however that still failed with same error. Eventually adding -j 2
seemed to help: sudo su - gitlab-psql -c "/opt/gitlab/embedded/postgresql/11/bin/vacuumdb -j 2 --all --analyze-in-stages -h /var/opt/gitlab/postgresql"
. However by the time I added -j 2
I had tried running original command a number of times so that could have been a factor too?
Steps to reproduce
Run pg-upgrade
What is the current bug behavior?
Error running vacuumdb
What is the expected correct behavior?
No error
Relevant logs
Relevant logs
Database upgrade is complete, running vacuumdb analyze Error running /opt/gitlab/embedded/postgresql/11/bin/vacuumdb --all --analyze-in-stages -h /var/opt/gitlab/postgresql STDOUT: vacuumdb: processing database "gitlab_ci_production": Generating minimal optimizer statistics (1 target) vacuumdb: processing database "gitlabhq_production": Generating minimal optimizer statistics (1 target) vacuumdb: processing database "postgres": Generating minimal optimizer statistics (1 target) vacuumdb: processing database "template1": Generating minimal optimizer statistics (1 target) vacuumdb: processing database "gitlab_ci_production": Generating medium optimizer statistics (10 targets) vacuumdb: processing database "gitlabhq_production": Generating medium optimizer statistics (10 targets) STDERR: vacuumdb: vacuuming of database "gitlabhq_production" failed: ERROR: canceling statement due to statement timeout Please check the output, and rerun the command if needed: su - gitlab-psql -c "/opt/gitlab/embedded/postgresql/11/bin/vacuumdb --all --analyze-in-stages -h /var/opt/gitlab/postgresql" If the error persists, please open an issue at: https://gitlab.com/gitlab-org/omnibus-gitlab/issues
Details of package version
Provide the package version installation details
Edited by Ben Bodenmiller