<div dir="ltr"><div class="gmail_default" style="font-size:large">Generating the UUIDs outside the database is not possible always , for example it is not possible when you install the DBV with initial data .... so , in any case we need this support inside the database engine <br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Aug 1, 2016 at 4:16 PM, Juan Hernández <span dir="ltr"><<a href="mailto:jhernand@redhat.com" target="_blank">jhernand@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 08/01/2016 11:02 AM, Yedidyah Bar David wrote:<br>
> On Sun, Jul 31, 2016 at 6:35 PM, Jenkins CI <<a href="mailto:gerrit2@gerrit.ovirt.org">gerrit2@gerrit.ovirt.org</a>> wrote:<br>
>> Jenkins CI has posted comments on this change.<br>
>><br>
>> Change subject: build: ovirt-engine-4.0.2.3<br>
>> ......................................................................<br>
>><br>
>><br>
>> Patch Set 2:<br>
>><br>
>> Build Failed<br>
>><br>
>> <a href="http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-el7-x86_64/64/" rel="noreferrer" target="_blank">http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-el7-x86_64/64/</a> : FAILURE<br>
><br>
> 15:07:43 Running upgrade sql script<br>
> './packaging/dbscripts/upgrade/03_05_0580_add_default_instance_types.sql'...<br>
> 15:07:43 psql:./packaging/dbscripts/upgrade/03_05_0580_add_default_instance_types.sql:131:<br>
> ERROR: duplicate key value violates unique constraint<br>
> "pk_permissions_id"<br>
> 15:07:43 DETAIL: Key (id)=() already exists.<br>
><br>
> Didn't try reproducing, but my best guess is that above uuid<br>
> was generated by a call to uuid_generate_v1() in above file after it<br>
> was already inserted to the table in<br>
> dbscripts/data/00600_insert_permissions.sql.<br>
><br>
> Perhaps we should be using something more random.<br>
><br>
> [1] <a href="https://www.postgresql.org/docs/9.5/static/uuid-ossp.html" rel="noreferrer" target="_blank">https://www.postgresql.org/docs/9.5/static/uuid-ossp.html</a><br>
><br>
<br>
</span>Note that we did use that long time ago, and we decided to stop using it<br>
because enabling that extension required an additional RPM package<br>
(postgrersql-contrib) and different mechanisms to enable it in<br>
PostgreSQL 8 and PostgreSQL 9, which was cumbersome. As we should now<br>
support only PostgreSQL 9.2 or newer, this may be no longer a problem.<br>
In that case you can just remove our "uuid_generate_v1" function and<br>
enable the extension, the name of the function is the same.<br>
<br>
However, it would be better, in general, to generate the identifiers<br>
outside of the database, and pass them as parameters to the stored<br>
procedures or SQL statements, that way we have less dependencies.<br>
<br>
See bug 870056 for additional information.<br>
<span class=""><br>
>><br>
>> <a href="http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-fc23-x86_64/64/" rel="noreferrer" target="_blank">http://jenkins.ovirt.org/job/ovirt-engine_4.0.2_check-merged-fc23-x86_64/64/</a> : SUCCESS<br>
>><br>
>> --<br>
>> To view, visit <a href="https://gerrit.ovirt.org/61733" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/61733</a><br>
>> To unsubscribe, visit <a href="https://gerrit.ovirt.org/settings" rel="noreferrer" target="_blank">https://gerrit.ovirt.org/settings</a><br>
>><br>
>> Gerrit-MessageType: comment<br>
>> Gerrit-Change-Id: Ice9518eea22dfa19126e04e49f3a76ee86f3e3c0<br>
>> Gerrit-PatchSet: 2<br>
>> Gerrit-Project: ovirt-engine<br>
>> Gerrit-Branch: ovirt-engine-4.0.2<br>
>> Gerrit-Owner: Yedidyah Bar David <<a href="mailto:didi@redhat.com">didi@redhat.com</a>><br>
>> Gerrit-Reviewer: Eyal Edri <<a href="mailto:eedri@redhat.com">eedri@redhat.com</a>><br>
>> Gerrit-Reviewer: Jenkins CI<br>
>> Gerrit-Reviewer: Oved Ourfali <<a href="mailto:oourfali@redhat.com">oourfali@redhat.com</a>><br>
>> Gerrit-Reviewer: Yedidyah Bar David <<a href="mailto:didi@redhat.com">didi@redhat.com</a>><br>
>> Gerrit-Reviewer: gerrit-hooks <<a href="mailto:automation@ovirt.org">automation@ovirt.org</a>><br>
>> Gerrit-HasComments: No<br>
><br>
><br>
><br>
<br>
<br>
--<br>
</span>Dirección Comercial: C/Jose Bardasano Baos, 9, Edif. Gorbea 3, planta<br>
3ºD, 28016 Madrid, Spain<br>
Inscrita en el Reg. Mercantil de Madrid – C.I.F. B82657941 - Red Hat S.L.<br>
</blockquote></div><br></div>