Skip to content
Snippets Groups Projects
Commit e3c9c7ab authored by Balasankar 'Balu' C's avatar Balasankar 'Balu' C
Browse files

Merge branch '8247-do-not-fail-if-pg-upgrade-rolls-back' into 'master'

Detect potential previous pg-upgrade failures

Closes #8247

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7587



Merged-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: default avatarAndrew Patterson <apatterson@gitlab.com>
Approved-by: default avatarBalasankar 'Balu' C <balasankar@gitlab.com>
Reviewed-by: default avatarIan Baum <ibaum@gitlab.com>
Co-authored-by: default avatarRobert Marshall <rmarshall@gitlab.com>
parents bb07fbd2 d8604e7a
No related branches found
No related tags found
1 merge request!137Remerge after conversion fixups
......@@ -182,6 +182,13 @@
log "Upgrading PostgreSQL to #{@db_worker.target_version}"
if GitlabCtl::Util.progress_message('Checking for previous failed upgrade attempts') do
File.exist?("#{@db_worker.tmp_data_dir}.#{@db_worker.initial_version.major}")
end
$stderr.puts "Detected a potential failed upgrade. Directory #{@db_worker.tmp_data_dir}.#{@db_worker.initial_version.major} already exists."
Kernel.exit 1
end
deprecation_message if @db_worker.target_version.major.to_f < 13
target_data_dir = "#{@db_worker.tmp_data_dir}.#{@db_worker.target_version.major}"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment