Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #8292

Closed
Open
Created Nov 12, 2014 by Administrator@rootOwner

During restore of gitlab-7.4.3-omnibus: "ERROR: must be owner of extension plpgsql"

Created by: ghost

I'm attempting to migrate an Omnibus GitLab 7.4.3 hosted on CentOS6 to another CentOS6 machine, using backup and restore. The source instance runs "gitlab-rake gitlab:backup:create" every night, and I copied the resulting tarball to the freshly installed destination instance, where I then tried:

gitlab-rake gitlab:backup:restore BACKUP=1415689405

This results in one error, and several warnings. The error comes right at the start:

Unpacking backup ... done
Restoring database ...
Restoring PostgreSQL database gitlabhq_production ... SET
SET
SET
SET
SET
CREATE EXTENSION
psql:/var/opt/gitlab/backups/db/database.sql:22: ERROR:  must be owner of extension plpgsql

but this does not seem immediately fatal, it continues with printing database statements (why are these echo'd anyway?):

SET
CREATE SEQUENCE
ALTER TABLE
[...]

This goes on for some time, and after a while it prints these warnings:

[...]
ALTER TABLE
psql:/var/opt/gitlab/backups/db/database.sql:15761: WARNING:  no privileges could be revoked for "public"
REVOKE
psql:/var/opt/gitlab/backups/db/database.sql:15762: WARNING:  no privileges could be revoked for "public"
REVOKE
psql:/var/opt/gitlab/backups/db/database.sql:15763: WARNING:  no privileges were granted for "public"
GRANT
psql:/var/opt/gitlab/backups/db/database.sql:15764: WARNING:  no privileges were granted for "public"
GRANT
[DONE]

I saw something that looked like the "must be owner" error in #6067 (closed), but that issue appears to have been closed due to a timeout, without a real resolution.

Any idea whether the restored instance will now have a correct database? The line 22 about which the error is reported just has:

COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';

while lines 15761 through 15764 are:

REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM "gitlab-psql";
GRANT ALL ON SCHEMA public TO "gitlab-psql";
GRANT ALL ON SCHEMA public TO PUBLIC;
Assignee
Assign to
Time tracking