run_pg_upgrade

in files/gitlab-ctl-commands/upgrade.rb [137:159]


def run_pg_upgrade
  return unless attempt_auto_pg_upgrade?

  if postgresql_upgrade_disabled? || geo_detected? || patroni_detected?
    log ''
    log '==='
    log 'Skipping the check for newer PostgreSQL version and automatic upgrade.'
    log "Please see #{pg_upgrade_doc_url}"
    log 'for details on how to manually upgrade the PostgreSQL server'
    log '==='
    log ''
  else
    unless GitlabCtl::Util.progress_message('Checking if a newer PostgreSQL version is available and attempting automatic upgrade to it') do
      command = %W(
      status = run_command(command.join(' '))
      status.success?
    end
      log 'Error ensuring PostgreSQL is updated. Please check the logs'
      Kernel.exit 1
    end
  end
end