When upgrading from 3.2 to 3.3 with a local database, ownership of all database objects is changed from 'postgres' to 'engine_reports'. This is done by running the pg_dump command to search for the postgres owner, which can fill up the disk with logs if the database size is large. Furthermore, the SQL commands for changing the ownership are run individually, which can be slow. Now, pg_dump only retrieves only the schema, which is sufficient for this purpose, and all SQL commands are run in a single PSQL command.
DescriptionYedidyah Bar David
2013-12-29 09:48:58 UTC
+++ This bug was initially created as a clone of Bug #1046676 +++
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_reports'. 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, 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.
This is less severe than bz #1046676 because the database in reports is not expected to be large.
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-0035.html