Bug 1014773 - Wrong pg_dump version in PATH after upgrade to PostgreSQL 9.2
Summary: Wrong pg_dump version in PATH after upgrade to PostgreSQL 9.2
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jhon Honce
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-02 18:21 UTC by Michal Moravec
Modified: 2015-05-14 23:29 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-10-17 13:33:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Michal Moravec 2013-10-02 18:21:03 UTC
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
/usr/bin/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 21:56:25 UTC
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 22:52:44 UTC
verified with devenv_3851

Comment 3 Michal Moravec 2013-10-03 06:29:23 UTC
Removing and reinstalling the cartridge DID NOT correct the issue.

Comment 4 Peter Ruan 2013-10-03 06:52:22 UTC
Hi Michal,
  What version are you running your command against?  Production, devenv, or some other environment?

Comment 5 Michal Moravec 2013-10-04 08:09:42 UTC
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 18:42:02 UTC
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 06:51:31 UTC
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.