Description of problem: When customer would follow this guide: https://access.redhat.com/documentation/en-US/Red_Hat_Satellite/5.7/html/Installation_Guide/sect-Migrating_from_an_External_Oracle_Database_to_an_Embedded_Database.html 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): current 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
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.
Jan, could you please confirm if my request above is valid? Also please check that "this is applicable to all scenarios" section.
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.