<div dir="ltr">On Wed, Jul 2, 2014 at 1:09 PM, Yi Kong <span dir="ltr"><<a href="mailto:kongy.dev@gmail.com" target="_blank">kongy.dev@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On 2 July 2014 18:59, Chris Matthews <<a href="mailto:chris.matthews@apple.com">chris.matthews@apple.com</a>> wrote:<br>

> Yep, so we use Postgres internally extensively.<br>
<br>
</div>Given that pgsql is already well tested internally, should we switch<br>
from SQLite on public server ASAP? The frequent server crash is<br>
causing some annoyance.<br></blockquote><div><br></div><div>We don't currently have Postgres available on the server, so it will take us (me?) some work to get it installed and then migrate the database. I am going on vacation for two weeks, so I won't be available to do this for a little while.</div>
<div><br></div><div> - Daniel</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class=""><br>
> Right now, if you make an empty postgres db, and just use the URL in the LNT<br>
> config file, it will create the tables on first run.  That is how I have<br>
> been doing it. This patch is adding a command line option to do the same<br>
> thing.<br>
><br>
> I think if we are going to expose support for Postgres to users, which I<br>
> agree we should, we need a new section in the documentation explaining how<br>
> to do it, and at least a smoke test in test suite to make sure we don’t<br>
> break support, and a test to make sure the create call works with a postgres<br>
> URLs.<br>
><br>
> Yi, can you add those things to your patch, or in subsequent patches?<br>
><br>
> It would also be important to have a section of docs on how to migrate from<br>
> sqlite to Postgres, as I assume that is the path most users would end up<br>
> taking.<br>
<br>
</div>Sure.<br>
<div class="HOEnZb"><div class="h5"><br>
> We do also have to be careful.  There are situations I have found were the<br>
> same flask queries don’t return the same results on sqlite and Postgres.  I<br>
> have not hit this in LNT, but in development of LNT extensions, so it is<br>
> something to watch out for!<br>
><br>
> On Jul 2, 2014, at 9:17 AM, Daniel Dunbar <<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>> wrote:<br>
><br>
> We run our internal LNT against Postgres and have done so for quite a while,<br>
> Chris can you check this patch and see why we don't need it? Is it just<br>
> because we manually updated the configuration?<br>
><br>
>  - Daniel<br>
><br>
> On Wednesday, July 2, 2014, Yi Kong <<a href="mailto:kongy.dev@gmail.com">kongy.dev@gmail.com</a>> wrote:<br>
>><br>
>> Patch...<br>
>><br>
>> On 2 July 2014 17:13, Yi Kong <<a href="mailto:kongy.dev@gmail.com">kongy.dev@gmail.com</a>> wrote:<br>
>> > Public LLVM perf server suffers from frequent database locking issues.<br>
>> > SQLite is suspected to cause the problem as it is not designed for<br>
>> > multi-user system like LNT.<br>
>> ><br>
>> > The patch makes LNT compatible with PostgreSQL. Although theoretically<br>
>> > MySQL should work as well, it's not tested.<br>
>> ><br>
>> > SQLite is still supported and used by default, since setting up<br>
>> > PostgreSQL is difficult and unnecessary if deployed locally.<br>
>> ><br>
>> > To use PostgreSQL, you need to create a pgdb manually:<br>
>> >     CREATE DATABASE "lnt.db";<br>
>> > And run:<br>
>> >     lnt create SANDBOX --db-dir postgresql://user@localhost<br>
>> ><br>
>> > Cheers,<br>
>> > Yi<br>
><br>
><br>
</div></div></blockquote></div><br></div></div>