Bug 1261847 - when migrating from Oracle to PostgreSQL or vice versa package rhn-upgrade should not be installed
when migrating from Oracle to PostgreSQL or vice versa package rhn-upgrade sh...
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Docs Installation Guide (Show other bugs)
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Dan Macpherson
Dan Macpherson
Depends On:
  Show dependency treegraph
Reported: 2015-09-10 06:04 EDT by Jan Hutař
Modified: 2015-10-20 23:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-10-20 23:31:45 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 Jan Hutař 2015-09-10 06:04:55 EDT
Description of problem:
 When customer would follow this guide:


in step "spacewalk-dump-schema --to=postgresql >
migrate-to-postgresql.sql" the utility would
add /etc/sysconfig/rhn/schema-dump/sql/* to the end of the dump,
but because dump is already in 5.7.0 version, this would fail
(e.g. because we want to insert some taskomatic bunch which is
already present).

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

Expected results:
There should be instruction (somewhere before step with spacewalk-dump-schema) to make sure you do not have rhn-upgrade package installed.

I believe this is applicable to all scenarios:

  12.8.1. Migrating from an Embedded Database to a Managed Database
  12.8.2. Migrating from an Embedded Database to an External PostgreSQL Database
  12.8.3. Migrating from an Embedded Database to an External Oracle Database
  12.8.4. Migrating from a Managed Database to an Embedded Database
  12.8.5. Migrating from an External PostgreSQL Database to an Embedded Database
  12.8.6. Migrating from an External Oracle Database to an Embedded Database
Comment 1 Jan Hutař 2015-09-10 06:07:23 EDT
I have checked external Oracle to embedded PostgreSQL and indeed when importing dump created with rhn-upgrade package installed, you get:

# spacewalk-sql -i < /tmp/migrate-to-postgresql-with-rhn-upgrade-installed.sql
ERROR:  more than one row returned by a subquery used as an expression

Importing dump which was created without rhn-upgrade package installed it works.
Comment 2 Jan Hutař 2015-09-10 06:12:30 EDT
Jan, could you please confirm if my request above is valid? Also please check that "this is applicable to all scenarios" section.
Comment 3 Jan Dobes 2015-09-10 11:41:04 EDT
Yes, rhn-upgrade package should not be needed if we are migrating between same schema versions. Only affected scenario seems to be Oracle -> PostgreSQL but rhn-upgrade should not be needed for any migrations. The other option would be to fix this problem in spacewalk-dump-schema code.

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