<story><title>PostgreSQL is enough</title><url>https://gist.github.com/cpursley/c8fb81fe8a7e5df038158bdfe0f06dbb</url></story><parent_chain><item><author>Ensorceled</author><text>&amp;gt; [...] sqlite is the 80% case and is also dead simple to get going and genuinely performant.&lt;p&gt;I don&amp;#x27;t understand this.  PostgreSQL is ALSO dead simple to get going, either locally or in production.  Why not just start off at 90%?&lt;p&gt;I mean, I get there are a lot of use cases where sqlite is the better choice (and I&amp;#x27;ve used sqlite multiple times over the years, including in my most recent gig), but why in general?</text></item><item><author>prisenco</author><text>This makes a strong case, but I&amp;#x27;ve decided to start every new project with sqlite and not switch until absolutely necessary. If Postgres is the 90% case, then sqlite is the 80% case and is also dead simple to get going and genuinely performant. So when vertical scaling finally fails me, I know I&amp;#x27;ll be at a wonderful place with what I&amp;#x27;m building.</text></item></parent_chain><comment><author>tvink</author><text>I think &amp;quot;dead simple&amp;quot; is not doing anyone any favors when it is being used to try to equate the simplicity of things.&lt;p&gt;It&amp;#x27;s obviously a lot simpler to just have a file, than to have a server that needs to be connected to, as long as we&amp;#x27;re still talking about running things on regular computers.</text></comment>
<story><title>PostgreSQL is enough</title><url>https://gist.github.com/cpursley/c8fb81fe8a7e5df038158bdfe0f06dbb</url></story><parent_chain><item><author>Ensorceled</author><text>&amp;gt; [...] sqlite is the 80% case and is also dead simple to get going and genuinely performant.&lt;p&gt;I don&amp;#x27;t understand this.  PostgreSQL is ALSO dead simple to get going, either locally or in production.  Why not just start off at 90%?&lt;p&gt;I mean, I get there are a lot of use cases where sqlite is the better choice (and I&amp;#x27;ve used sqlite multiple times over the years, including in my most recent gig), but why in general?</text></item><item><author>prisenco</author><text>This makes a strong case, but I&amp;#x27;ve decided to start every new project with sqlite and not switch until absolutely necessary. If Postgres is the 90% case, then sqlite is the 80% case and is also dead simple to get going and genuinely performant. So when vertical scaling finally fails me, I know I&amp;#x27;ll be at a wonderful place with what I&amp;#x27;m building.</text></item></parent_chain><comment><author>benlivengood</author><text>Practically, because sqlite is good enough for one machine and compatible-enough with postgresql that you can use either pretty easily.  One thing I wrote was an exactly-once stream processor that fetched events from a lot of remote systems for processing.  Transaction-based queue in the DB to achieve exactly-once with recovery (remote systems accepted time-stamp resyncing of the stream of events).  It works fine at small scale on a single machine for design and testing (local integration tests with short startup time are very valuable) but trivially scales to hundreds of workers if pointed at a postgres instance.  The work to allow sqlite vs postgres was a single factory that returned a DB connection in Go based on runtime configuration.&lt;p&gt;It&amp;#x27;s also good practice for designing reasonably cross-database compatible schemas.</text></comment>