Description of problem: On upgrade from 3.2 to 3.3 with a local database, we change the ownership of all db objects from 'postgres' to 'engine_history'. We do this by running 'pg_dump', searching the output for 'Owner postgres', then create a set of sql commands to change the ownership and run them, each in its own psql command. This has two problems: 1. pg_dump's output also goes to the log, and if the database is large (e.g. several GBs), the log might feel up the disk. 2. Running each command in its own psql is slow Proposed solution: 1. We should add '-s' to pg_dump to dump only the schema, that's enough for that purpose 2. We should run all the SQL commands in a single psql command.
verified on rhevm-dwh-3.3.0-28.el6ev.noarch Ownership changes and all queries done in single command and pg_dump -s used (upgrade log attached) ====== message regarding backup may take time ===== The upgrade utility can backup the existing database. The time and space required for the database backup depend on its size. The detected DB size is 18 MB. This process takes time, and in some cases (for instance, when the size is few GBs) may take few hours to complete. Would you like to continue and backup the existing database? === owner changed === ovirt_engine_history | engine_history | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/engine_history : engine_history=CTc/engine_history : readonly=c/engine_history
Created attachment 851146 [details] dwhlog
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2014-0036.html