<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hello,<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">to
make things completely clear: any developer which will perform any
changes around permissions tables need to use only predefined stored
procedures for permissions handling. If for some reason direct SQL
update is performed, then materialized view will not be refreshed until
some permission stored procedure is called, which could cause strange
results.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Eli has already removed all such code within patch [3], so this is just a warning for future.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks<br><br></div>Martin<br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jul 17, 2017 at 9:47 PM, Eli Mesika <span dir="ltr"><<a href="mailto:emesika@redhat.com" target="_blank">emesika@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div style="font-size:large">Materialized Views [1]<span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline"> can be used to reduce query time on complex queries with low data update <br><br></span></div><div style="font-size:large"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">The first candidates to use this feature are all the *permission* views <br><br></span></div><div style="font-size:large"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">There is already a RFE [2] opened for that.<br><br></span></div><div style="font-size:large"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">Please make sure that each call that handles the permissions table data is using the corresponding SP in dbscripts/multi_level_administ<wbr>ration.sql<br></span></div><div style="font-size:large"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">No direct access to the permissions table is allowed !<br><br></span></div><div style="font-size:large"><span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">In case that a direct access to the permissions table is used, you should replace the code in a call to the corresponding SP as you can see in [3]<br></span></div><div style="font-size:large"><br></div><div style="font-size:large">A direct use that will not be replaced with a call to <span style="font-size:11pt;font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:400;font-style:normal;font-variant:normal;text-decoration:none;vertical-align:baseline">the corresponding SP may cause that direct changes to the permissions table will not be reflected in theĀ </span><br>*permission* Materialized Views and the views will remain dirty until a change that is calling one of the SPs that handle the data of the permissions table is issued and cause the Materialized Views to be refreshed <br></div><div style="font-size:large"><br></div><div style="font-size:large">Please check your code for direct use of the permissions table and consult with me if you have any questions or issues.<br><br></div><div style="font-size:large">Thanks<br><br></div><div style="font-size:large">Eli Mesika <br></div><div style="font-size:large"><br>[1] <a href="https://wiki.postgresql.org/wiki/Materialized_Views" target="_blank">https://wiki.postgresql.org/wi<wbr>ki/Materialized_Views</a><br>[2] <a href="https://bugzilla.redhat.com/show_bug.cgi?id=1470991" target="_blank">https://bugzilla.redhat.com/sh<wbr>ow_bug.cgi?id=1470991</a><br>[3] <a href="https://gerrit.ovirt.org/#/c/79287/" target="_blank">https://gerrit.ovirt.org/#/c/7<wbr>9287/</a><br></div></div>
</div><br></div>
<br>______________________________<wbr>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@ovirt.org">Devel@ovirt.org</a><br>
<a href="http://lists.ovirt.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.ovirt.org/<wbr>mailman/listinfo/devel</a><br></blockquote></div><br></div>