Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • infrastructure infrastructure
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 107
    • Issues 107
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 20
    • Merge requests 20
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Arch LinuxArch Linux
  • infrastructureinfrastructure
  • Merge requests
  • !193

roles/postgres: make the upgrade_pg.sh script more robust

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Jakub Klinkovský requested to merge lahwaacz/infrastructure:upgrade_pg into master Dec 17, 2020
  • Overview 1
  • Commits 2
  • Pipelines 4
  • Changes 1

Another thing that should probably be improved is the point at which the postgresql and postgresql-libs packages are upgraded. Currently that has to be done before running the upgrade_pg.sh script, but then postgresql.service may fail any time (but it probably won't cause database corruption).

This could be improved by adding the packages to IgnorePkg and upgrading them from the upgrade_pg.sh script along with postgresql-old-upgrade, which is after postgresql.service has been stopped. The condition at the start would have to be changed, since pacman -Q would give the old version. I'm using TO_VERSION=$(expac -S "%v" postgresql) in a personal script (which is based on yours), but expac is probably not installed on Arch servers at the moment. The subcommand should also skip the potential version from [testing], since that won't be installed due to [testing] Usage=Search Sync in pacman.conf.

CC @grazzolini

Edited Dec 17, 2020 by Jakub Klinkovský
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: upgrade_pg