Add PostgreSQL support as an alternative to SQLite in refactor

(#960) Feature Shipped self-hosting

Problem

SQLite can be unreliable when the database file is stored on network-attached storage, which is a common pattern in containerized/Docker deployments. This could lead to data corruption for self-hosters who don't store their data on a local filesystem.

Proposed solution

Support PostgreSQL as an alternative database backend alongside SQLite, configurable via an environment variable or config file.

Notes (optional)

SQLite is a great default for simple single-server setups. PostgreSQL would complement it well for users running Fluxer on existing infrastructure with shared database services, and handles concurrent access better at scale.

4 comments

Sign in with Fluxer to comment and vote.
Comment by @Mar0xy
RexSystem 1 vote originally by @Mar0xy on GitHub
I would actually prefer a LibSQL/Turso alternative as well especially considering stuff like Bunny's newly released Database feature where they offer libsql DBs with replication and etc
Comment by @evoandroidevo
RexSystem 1 vote originally by @evoandroidevo on GitHub
Does Cassandra not already meet this goal? If you also dont want to deal with the JVM GC scylladb can still be used if you have less than 10tb of space and less than 50 hyper threads.
Comment by @shininghero
RexSystem 1 vote originally by @shininghero on GitHub
Postgres and MySQL/MariaDB support should definitely be a thing, if only to provide a scalable and versatile base as needed. Both have capable replication and load balancing options.
Comment by @spectrapulse
RexSystem 1 vote originally by @spectrapulse on GitHub
I mean honestly all that is really necessary would be Postgres. It runs great, it can scale very easily, it's very extensible and many things are built ontop of it. It supports standard SQL syntax and isn't some weird niche and many things are compatible with it or meant as a drop in replacement for it in extreme cases. Also compared to all the other options it is one of the few that can truly be ran cloudnative and scale without hassle and it is incredibly efficient even for small setups.