tommiehansen / gab

Gekko Automated Backtests
57 stars 19 forks source link

Add support for PostgreSQL #26

Open GO1984 opened 6 years ago

GO1984 commented 6 years ago

Since GEKKO supports native support for PostgreSQL out of the box, i thought why not using PostgreSQL instead of MySQL? So we could use the same database/logins for gekko AND GAB.

According to e recent test they should be similar in performance:

https://www.percona.com/blog/2017/01/06/millions-queries-per-second-postgresql-and-mysql-peaceful-battle-at-modern-demanding-workloads/

What do you think about adding PostgreSQL support in GAB?

tommiehansen commented 5 years ago

It isn't a performance problem though, it's a stability problem hence MySQL + innoDB as an option.

The problem with SQLite was that in some installs (e.g. via Windows WSL (bash on windows)) SQLite isn't that stable when it comes to concurrent write(s). It's basically a permission issue etc with the drivers (and with WSL in general).

Hence MySQL was added. If one doesn't run WSL but rather runs pure nix one can use SQLite instead since it really isn't a performance problem. A deafault SQLite would handle all the writing without problems on a default nix install. It's just that MySQL (or any other database) is a bit more stable when it comes to things such as data corruption etc (which is mostly a problem under Windows or Windows + WSL).