Blixt Documentation v2.9

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.

  1. 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;
    
  2. Point BlixtFS at it:

    database:
      type: postgres
      host: db.example.internal
      port: 5432
      name: bfs
      username: bfs
      connections: 25
    

    Pass the password as DATABASE_PASSWORD rather than writing it in the file. In the Helm chart, set postgres.enabled=false and fill in externalDatabase.*.

  3. 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.