
Migrating Graphite from SQLite to PostgreSQL - craigkerstiens
http://obfuscurity.com/2013/12/Migrating-Graphite-from-SQLite-to-PostgreSQL
======
yeukhon
There is no reason why one would use SQLite in real production. Even during
testing and dev, I am a firm believer of testing against real database that
you are going to use in production. The problem "it's hard to setup a new
database" is a result of not willing to invest in re-provisionable system.

~~~
mst
There are plenty of reasons.

    
    
      * Single file to back up
      * Unix fs permissions sufficient for security
      * Simplicity valuable over write concurrency
      * Ability to write functions/aggregates/collations in the language you're embedding sqlite in
      * No need for maintaining and securing a system daemon
    

This article isn't, at all, about a problem with SQLite. It's about graphite
shipping a stupid postgres schema. Had they used text for the column like
anybody who knows how to use postgres would recommend, the graph names
would've transferred fine.

TL;DR - graphite devs don't understand postgresql, graphite user misdiagnoses
the problem and blames sqlite for it.

~~~
Someone
The way I read this, this _is_ a problem with SQLite (somewhat). Both schemas
limit the length of graph names, but SQLite ignores that part of the schema.

One can discuss whether it is a good idea to have that arbitrary, low limit,
but that is not what this is about.

I agree that there are plenty of reasons to use SQLite in production. IMO, the
conclusion should have been that one should run the same database in
development, test, and production.

------
andrewvc
As a fan of both databases, I just have to say, you don't always need all the
constraints.

Also, at the very least, graphite should have been able to enforce them at the
app level in addition to at the DB level.

~~~
obfuscurity_
I completely agree. I was rather disappointed to find that it didn't.

~~~
yeukhon
Is it by default it ships with SQLite or just Doc?

~~~
obfuscurity_
I'm not sure what you're asking here. Graphite uses SQLite by default. What is
"Doc"?

~~~
yeukhon
So it ships with SQLite. Doc as in documentation - telling users to get
started let's try SQLite.

------
alixaxel
Meh, SQLite is awesome. So is PostgreSQL, but this rant is uncalled for.

~~~
obfuscurity_
How is the article a rant? Or are you referring to the one of the comments
above?

