Metadata database
The SQL database that holds BlixtFS's metadata index, and how to use your own instead of the embedded one.
The embedded database
The single-node images start their own PostgreSQL server inside the container and keep its files in the data directory. You don’t need to install or manage anything. The Helm chart does the same with a bundled PostgreSQL StatefulSet.
Using your own PostgreSQL
For production, especially for scale-out, a managed PostgreSQL service such as Cloud SQL, Amazon RDS or Azure Database for PostgreSQL gives you backups and failover without extra work.
-
Create a database and a user for BlixtFS. For example, in
psql:CREATE USER bfs WITH PASSWORD 'choose-a-password'; CREATE DATABASE bfs OWNER bfs; -
Point BlixtFS at it:
database: type: postgres host: db.example.internal port: 5432 name: bfs username: bfs connections: 25Pass the password as
DATABASE_PASSWORDrather than writing it in the file. In the Helm chart, setpostgres.enabled=falseand fill inexternalDatabase.*. -
Start BlixtFS. It creates its tables on first start. When a new release changes an existing table, the upgrade guide lists the step to take.
Connection limits
Each BlixtFS server opens up to database.connections connections (25 by
default). Make sure the database’s max_connections is larger than the total
across all servers, with headroom for administration. When the database runs
out of connections, file operations fail.
Other databases
BlixtFS also supports MySQL, SQLite and Google Cloud Spanner for the metadata index. See Databases for when each is appropriate.