Customer cannot dump schema into structure.sql because it is a shared schema managed by a 3rd party
This customer has a dba team who have their own parent schema. When the
pg_dump occurs it fails with permission errors.
Steps to reproduce
Revoke access to the db schema for the
gitlab-psql owner then run
What is the current bug behavior?
The migration will fail when it attempts to dump the
What is the expected correct behavior?
I think that during upgrades we should expect to dump the gitlab database schema, and not the entire parent schema, which could contain databases outside of the scope of GitLab, i.e. dump
database.schema.table instead of
Relevant logs and/or screenshots
Recipe: gitlab::database_migrations * bash[migrate gitlab-rails database] action run [execute] pg_dump: [archiver (db)] query failed: ERROR: permission denied for schema dbschema pg_dump: [archiver (db)] query was: LOCK TABLE dbschema.dbdumpdate IN ACCESS SHARE MODE rake aborted! failed to execute: pg_dump -s -x -O -f /opt/gitlab/embedded/service/gitlab-rails/db/structure.sql -T untracked_files_for_uploads gitlabdb Please check the output above for any errors and make sure that `pg_dump` is installed in your PATH and has proper permissions. /opt/gitlab/embedded/service/gitlab-rails/lib/tasks/gitlab/db.rake:49:in `block (3 levels) in <top (required)>' /opt/gitlab/embedded/bin/bundle:23:in `load' /opt/gitlab/embedded/bin/bundle:23:in `<main>' Tasks: TOP => db:structure:dump (See full trace by running task with --trace)