Bug 1014773 - Wrong pg_dump version in PATH after upgrade to PostgreSQL 9.2
Wrong pg_dump version in PATH after upgrade to PostgreSQL 9.2
Product: OpenShift Online
Classification: Red Hat
Component: Containers (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jhon Honce
libra bugs
Depends On:
  Show dependency treegraph
Reported: 2013-10-02 14:21 EDT by Michal Moravec
Modified: 2015-05-14 19:29 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-17 09:33:34 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Moravec 2013-10-02 14:21:03 EDT
Description of problem:

I upgraded PostgreSQL cartridge 8.4 to 9.2. When trying to backup the database using pg_dump, I got an error:

pg_dump: server version: 9.2.4; pg_dump version: 8.4.13
pg_dump: aborting because of server version mismatch

Version-Release number of selected component (if applicable):

How reproducible: I was not able to reproduce the way, but the current state of the application is wrong.

Actual results:

> pg_dump --version
  pg_dump (PostgreSQL) 8.4.13

[a-jpcz.rhcloud.com 522f5b4ce0b8cdbdb50000d4]\> which pg_dump

[a-jpcz.rhcloud.com 522f5b4ce0b8cdbdb50000d4]\> pg_dump --version
pg_dump (PostgreSQL) 8.4.13

[a-jpcz.rhcloud.com 522f5b4ce0b8cdbdb50000d4]\> echo $PATH
/var/lib/openshift/522f5b4ce0b8cdbdb50000d4/php/phplib/pear/pear:/var/lib/openshift/522f5b4ce0b8cdbdb50000d4/haproxy/usr/bin:/var/lib/openshift    /522f5b4ce0b8cdbdb50000d4/php/phplib/pear/pear::/bin:/usr/bin:/usr/sbin

Expected results:

I'm able to run command: /opt/rh/postgresql92/root/usr/bin/pg_dump

[a-jpcz.rhcloud.com 522f5b4ce0b8cdbdb50000d4]\> /opt/rh/postgresql92/root/usr/bin/pg_dump --version
pg_dump (PostgreSQL) 9.2.4

Additional info:

The forum thread: https://www.openshift.com/forums/openshift/postgres-92-backup-using-pgdump-after-upgrade
Comment 1 Jhon Honce 2013-10-02 17:56:25 EDT
Using devenv_3853

# rhc create-app php001 php-5.3 postgresql-8.4
# ssh <gear dns>

$ pg_dump --version
pg_dump (PostgreSQL) 8.4.13

# rhc cartridge remove -a php001 postgresql-8.4
# rhc cartridge add -a php001 postgresql-9.2
# ssh <gear dns>

$ pg_dump --version
pg_dump (PostgreSQL) 9.2.4

It appears postgresql/env/OPENSHIFT_POSTGRESQL_PATH_ELEMENT may not have been created or populated. Removing the cartridge and re-installing may correct the issue.
Comment 2 Peter Ruan 2013-10-02 18:52:44 EDT
verified with devenv_3851
Comment 3 Michal Moravec 2013-10-03 02:29:23 EDT
Removing and reinstalling the cartridge DID NOT correct the issue.
Comment 4 Peter Ruan 2013-10-03 02:52:22 EDT
Hi Michal,
  What version are you running your command against?  Production, devenv, or some other environment?
Comment 5 Michal Moravec 2013-10-04 04:09:42 EDT
Peter, what do you mean? I upgraded the cartridge via web interface, the `pg_dump` command run in ssh console.
Comment 6 Peter Ruan 2013-10-04 14:42:02 EDT
Hi Michal,
  I'm trying to found out what version of the server you are running this against and the client that you are using.  We have a public area (what we call PROD) and internal development sandboxes.  Can I assume that you are running your stuff against openshift.redhat.com?
Comment 7 Michal Moravec 2013-10-07 02:51:31 EDT
Yes, I'm running the stuff against openshift.redhat.com

Note You need to log in before you can comment on or make changes to this bug.