Eli Mesika has posted comments on this change.

Change subject: engine: Move anonymousHugePage to VdsStatistics
......................................................................


Patch Set 4:

(1 comment)

....................................................
File packaging/dbscripts/upgrade/03_04_0160_move_anonymousHugePages.sql
Line 6:     PERFORM fn_db_add_column('vds_statistics','anonymous_hugepages', 
'INTEGER NULL');
Line 7:     -- copy old quota from images table
Line 8:     UPDATE vds_statistics vs SET anonymous_hugepages = (SELECT 
anonymous_hugepages FROM vds_dynamic vd WHERE vs.vds_id = vd.vds_id);
Line 9:     -- remove quota_id column from images table
Line 10:     PERFORM fn_db_drop_column ('vds_dynamic', 'anonymous_hugepages');
No need for the SP , script not need to be re-entrant , this s already 
controlled by the db upgrade mechanism just leave the following and remove 
everything else

select fn_db_add_column('vds_statistics','anonymous_hugepages', 'INTEGER NULL');

UPDATE vds_statistics vs SET anonymous_hugepages = (SELECT anonymous_hugepages 
FROM vds_dynamic vd WHERE vs.vds_id = vd.vds_id);

select fn_db_drop_column ('vds_dynamic', 'anonymous_hugepages');
Line 11: END IF;
Line 12: END; $FUNCTION$
Line 13: LANGUAGE plpgsql;
Line 14: 


-- 
To view, visit http://gerrit.ovirt.org/21934
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I20dba0ba8beaac916f8af5f49456593077176efa
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Barak Azulay <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Liran Zelkha <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: Yaniv Dary <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to