Database

Database Configuration

On Zenifra, the main database settings are related to version, instances, password, failover, and storage.

PostgreSQL vs MariaDB

CharacteristicPostgreSQLMariaDB
Available versions15, 16, 17, 1810, 11
Instances1 to 3 total instances (db-free: 1)3 fixed instances
Instance changes laterYes, in hourly billingNo
Automatic failoverYes, with 2 or 3 instancesYes
db-free planYesNo

Database version

At creation time, the user can choose any version available in the console.

During edit:

  • only forward upgrades are supported
  • downgrades are not supported

Warning: version upgrades can cause a few minutes of downtime. Do this during low-traffic hours.

Instances and replicas

PostgreSQL

  • minimum of 1 total instance
  • maximum of 3 total instances
  • the primary instance handles writes and reads
  • extra instances act as read replicas

In hourly billing, the total instance count can be increased or decreased later while the database is running. In monthly and yearly billing, the configuration is fixed in the contract. On the db-free plan, the database always uses 1 instance.

MariaDB

MariaDB always runs with 3 fixed instances. That quantity cannot be changed.

Password

The database password can be renewed after creation. Zenifra generates a completely new password, which the console shows only once; store it somewhere safe. The database may be unavailable during the process.

Applications that use the database are not updated automatically. The console lists the linked applications so you can manually update the connection variable (for example, DATABASE_URL) in each one.

Connection details

The console shows:

  • host (postgresql-<project-id>.managed.zenifra.com or mariadb-<project-id>.managed.zenifra.com)
  • port
  • username app
  • database name app
  • a ready-to-copy connection URI with mandatory TLS (sslmode=verify-full for PostgreSQL and ssl=true for MariaDB)

The password is shown only at creation or after a renewal; afterward, the URI is shown with a masked password.

For PostgreSQL with 2 or 3 instances, the console also shows a read-only URI that routes queries to the replicas. For MariaDB, the provided connection points to the primary instance.

Failover

Automatic failover is supported for PostgreSQL with 2 or 3 instances and for MariaDB.

In case of primary instance failure, the platform can promote a replica automatically. Open connections can be closed during the switch; configure the application to reconnect.

Backups

There are no automatic backups or console restores. Make your own exports with pg_dump or mariadb-dump/mysqldump and test restores periodically.

Storage

  • every database uses persistent storage
  • storage can increase
  • storage can never shrink
  • changes are only available in hourly billing; on monthly and yearly contracts, capacity is fixed for the contract term
  • on the db-free plan, storage is fixed at 1 GB
  • increasing storage may cause temporary downtime

Good practices

  1. Plan version upgrades during low-traffic windows.
  2. Plan storage increases and instance adjustments considering possible temporary downtime.
  3. Manually configure DATABASE_URL in the HTTP application; Zenifra does not inject this ENV automatically.

Last updated on

On this page