Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-7251

postgres version not properly detected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Low
    • 3.9.1
    • None
    • None
    • CentOS 7.0, postgresql 9.2.10, Stash 3.7.1, unversioned (afaik) stash.diy-backup up-to-date on 2015-04-01

    Description

      This bit of code at the top of stash.diy-backup.postgresql.sh doesn;t work correctly.

      # Make use of PostgreSQL 9.3+ options if available
      psql_version="$(psql --version | awk '{print $3}')"
      if [[ ${psql_version//./} -ge 930 ]]; then
          PG_PARALLELL="-j 5"
          PG_SNAPSHOT_OPT="--no-synchronized-snapshots"
      fi
      

      Because my version of psql is 9.2.10 it determined that I would be able to use PG_PARALLELL="-j5" because the if condition compares 9210 again 930 and finds it greater.

      This caused the backup to crash in the middle and after canceling the backup with the token, it went into a further maintenance mode for which I could not find a token, so I had to restart Stash to get ti working again. Not yet clear if there was data loss.

      As a workaround I will comment out this section of code

      Attachments

        Activity

          People

            Unassigned Unassigned
            mark.ruedy mark.ruedy
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: