Eli Mesika has uploaded a new change for review.
Change subject: core:Upgrade from 3.1 to 3.2 fails
......................................................................
core:Upgrade from 3.1 to 3.2 fails
Upgrade failed on 3.1.3 to 3.2 on both PG 8.4.x and 9.x
On 8.4.x :
Problem was that attempt to drop the uuid generation support functions
was done with ${USERNAME}. since postgres is the owner of those
functions the user engine assigned to ${USERNAME} has no permissions to
drop those functions. Solution was to run the script that drops those
functions with user postgres.
on 9.x :
The DROP EXTENSION statement tried to drop uuid-ossp.
In postgres the '-' functions as '?' in regular expressions so I had to
wrap the name with double quotes.
Change-Id: I70eff71a8367879eae53ad3b003a050e289bc73e
Signed-off-by: Eli Mesika <[email protected]>
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=916728
---
M backend/manager/dbscripts/dbfunctions.sh
M backend/manager/dbscripts/drop_old_uuid_functions.sql
2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/51/12551/1
diff --git a/backend/manager/dbscripts/dbfunctions.sh
b/backend/manager/dbscripts/dbfunctions.sh
index 9fedcad..b7b1597 100755
--- a/backend/manager/dbscripts/dbfunctions.sh
+++ b/backend/manager/dbscripts/dbfunctions.sh
@@ -87,7 +87,7 @@
execute_file "drop_all_functions.sql" ${DATABASE} ${SERVERNAME} ${PORT} >
/dev/null
\rm -f drop_all_functions.sql
#drop old uuid functions
- psql -U ${USERNAME} -h ${SERVERNAME} -p ${PORT} -f
drop_old_uuid_functions.sql ${DATABASE} > /dev/null
+ psql -U postgres -h ${SERVERNAME} -p ${PORT} -f
drop_old_uuid_functions.sql ${DATABASE} > /dev/null
# recreate generic functions
execute_file "create_functions.sql" ${DATABASE} ${SERVERNAME} ${PORT} >
/dev/null
}
diff --git a/backend/manager/dbscripts/drop_old_uuid_functions.sql
b/backend/manager/dbscripts/drop_old_uuid_functions.sql
index efe9e43..1859187 100644
--- a/backend/manager/dbscripts/drop_old_uuid_functions.sql
+++ b/backend/manager/dbscripts/drop_old_uuid_functions.sql
@@ -5,7 +5,7 @@
-- removing first the extension from pg9.x installations
if exists (select 1 from information_schema.views where table_name =
'pg_available_extensions') then
-- The - is special character , so need to put -- in the name
- EXECUTE 'DROP EXTENSION IF EXISTS uuid--ossp CASCADE;';
+ EXECUTE 'DROP EXTENSION IF EXISTS "uuid-ossp" CASCADE;';
end if;
--Drops all old UUID functions since we have an internal implementation
--
To view, visit http://gerrit.ovirt.org/12551
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I70eff71a8367879eae53ad3b003a050e289bc73e
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Eli Mesika <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches