ERROR: relation "project_mirror_data" does not exist at character 42
Summary
After upgrading Gitlab CE Omnibus package from 10.3.5 to 10.4.0, EXTERNAL Postgres 9.6.6 logs error every 15seconds:
2018-01-22 22:18:42.509 EET [5803] gitlab@gitlabhq_production ERROR: relation "project_mirror_data" does not exist at character 42
2018-01-22 22:18:42.509 EET [5803] gitlab@gitlabhq_production STATEMENT: SELECT COUNT(*) FROM projects INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id WHERE projects.mirror = 't' AND projects.import_status NOT IN ('scheduled', 'started') AND next_execution_timestamp <= NOW();
Steps to reproduce
(How one can reproduce the issue - this is very important)
What is the current bug behavior?
Incomlete Postgresql schema state
What is the expected correct behavior?
(What you should see instead)
Relevant logs and/or screenshots
External Postgresql instance log:
2018-01-22 22:40:27.558 EET [5803] gitlab@gitlabhq_production ERROR: relation "project_mirror_data" does not exist at character 42 2018-01-22 22:40:27.558 EET [5803] gitlab@gitlabhq_production STATEMENT: SELECT COUNT(*) FROM projects INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id WHERE projects.mirror = 't' AND projects.import_status NOT IN ('scheduled', 'started') AND next_execution_timestamp <= NOW(); 2018-01-22 22:40:42.549 EET [5803] gitlab@gitlabhq_production ERROR: relation "project_mirror_data" does not exist at character 42 2018-01-22 22:40:42.549 EET [5803] gitlab@gitlabhq_production STATEMENT: SELECT COUNT(*) FROM projects INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id WHERE projects.mirror = 't' AND projects.import_status NOT IN ('scheduled', 'started') AND next_execution_timestamp <= NOW(); 2018-01-22 22:40:57.560 EET [5803] gitlab@gitlabhq_production ERROR: relation "project_mirror_data" does not exist at character 42 2018-01-22 22:40:57.560 EET [5803] gitlab@gitlabhq_production STATEMENT: SELECT COUNT(*) FROM projects INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id WHERE projects.mirror = 't' AND projects.import_status NOT IN ('scheduled', 'started') AND next_execution_timestamp <= NOW(); 2018-01-22 22:41:12.559 EET [5803] gitlab@gitlabhq_production ERROR: relation "project_mirror_data" does not exist at character 42 2018-01-22 22:41:12.559 EET [5803] gitlab@gitlabhq_production STATEMENT: SELECT COUNT(*) FROM projects INNER JOIN project_mirror_data ON project_mirror_data.project_id = projects.id WHERE projects.mirror = 't' AND projects.import_status NOT IN ('scheduled', 'started') AND next_execution_timestamp <= NOW();
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Ubuntu 14.04 Current User: git Using RVM: no Ruby Version: 2.3.6p384 Gem Version: 2.6.13 Bundler Version:1.13.7 Rake Version: 12.3.0 Redis Version: 3.2.11 Git Version: 2.14.3 Sidekiq Version:5.0.5 Go Version: unknown
GitLab information Version: 10.4.0 Revision: 128ef10 Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: postgresql URL: https://****** HTTP Clone URL: https:///some-group/some-project.git SSH Clone URL: git@:some-group/some-project.git Using LDAP: no Using Omniauth: no
GitLab Shell Version: 5.11.0 Repository storage paths:
- default: /var/opt/gitlab/git-data/repositories Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab Shell ...GitLab Shell version >= 5.11.0 ? ... OK (5.11.0) Repo base directory exists? default... yes Repo storage directories are symlinks? default... no Repo paths owned by git:root, or git:git? default... yes Repo paths access is drwxrws---? default... yes hooks directories in repos are links: ... 1/1 ... ok 1/2 ... ok 1/3 ... repository is empty 1/4 ... ok 1/5 ... ok 7/6 ... ok 1/7 ... ok 3/8 ... ok 3/9 ... ok 1/10 ... ok 1/12 ... ok 1/14 ... ok 1/15 ... ok 1/16 ... ok 1/17 ... ok 1/19 ... repository is empty 1/20 ... ok 1/21 ... ok 1/22 ... ok 1/23 ... ok 1/24 ... ok 1/25 ... ok 1/26 ... ok 1/27 ... ok 1/28 ... ok 1/29 ... ok 1/30 ... ok 1/31 ... ok 1/32 ... ok 1/33 ... ok 7/34 ... ok 1/35 ... ok 1/37 ... ok 1/38 ... ok 7/39 ... ok 1/40 ... ok 7/41 ... ok 1/42 ... ok 1/43 ... ok 1/44 ... ok 1/45 ... ok Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Check GitLab API access: OK Redis available via internal API: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Sidekiq ...
Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Reply by email is disabled in config/gitlab.yml Checking LDAP ...
LDAP is disabled in config/gitlab.yml
Checking LDAP ... Finished
Checking GitLab ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... skipped (no tmp uploads folder yet) Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 1/1 ... yes 1/2 ... yes 1/3 ... yes 1/4 ... yes 1/5 ... yes 7/6 ... yes 1/7 ... yes 3/8 ... yes 3/9 ... yes 1/10 ... yes 1/12 ... yes 1/14 ... yes 1/15 ... yes 1/16 ... yes 1/17 ... yes 1/19 ... yes 1/20 ... yes 1/21 ... yes 1/22 ... yes 1/23 ... yes 1/24 ... yes 1/25 ... yes 1/26 ... yes 1/27 ... yes 1/28 ... yes 1/29 ... yes 1/30 ... yes 1/31 ... yes 1/32 ... yes 1/33 ... yes 7/34 ... yes 1/35 ... yes 1/37 ... yes 1/38 ... yes 7/39 ... yes 1/40 ... yes 7/41 ... yes 1/42 ... yes 1/43 ... yes 1/44 ... yes 1/45 ... yes Redis version >= 2.8.0? ... yes Ruby version >= 2.3.5 ? ... yes (2.3.6) Git version >= 2.7.3 ? ... yes (2.14.3) Git user has default SSH configuration? ... yes Active users: ... 4
Checking GitLab ... Finished
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)