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, 1811, 12
Instances1 to 3 total instances3 fixed instances
Instance changes laterYes, in hourly billingNo
Automatic failoverYesYes

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.

Instances and replicas

PostgreSQL

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

In hourly billing, the total instance count can be increased or decreased later. In monthly and yearly billing, the configuration is fixed in the contract.

MariaDB

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

Password

The database password can be changed after creation. When this happens, Zenifra generates a completely new password and updates the URI shown in the console.

Connection details

The console shows:

  • host
  • port
  • username app
  • password
  • database name app
  • a ready-to-copy full URI

When replicas exist, the console can also show master details, replica details, and a ready URI for each one.

Failover

Automatic failover is supported for PostgreSQL and MariaDB.

In case of primary instance failure, the platform can promote a replica automatically.

Storage

  • every database uses persistent storage
  • storage can increase
  • storage can never shrink
  • on monthly and yearly contracts, changes should only happen after the contract ends
  • 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.