Docs
Skip to content

PostgreSQL

Maintenance_

Maintenance windows, online engine version upgrades, pause and resume, and the lifecycle states of your PostgreSQL database.

2 min read

Raw

Appwrite manages the infrastructure around your database: security patches, engine upgrades, and instance health. This page covers the controls you have over when and how that maintenance happens.

Maintenance window

Routine maintenance that can briefly affect the database runs inside a weekly window that you choose. Set it under Settings > Maintenance in the Console by picking a day and start hour (UTC), or through the API:

Maintenance window grid in database settings
Maintenance window grid in database settings

day accepts sun through sat, and hourUtc accepts 0 to 23.

Engine version upgrades

You can upgrade the PostgreSQL version online. A second instance is provisioned on the target version, data streams over with logical replication, and traffic cuts over once replication has caught up. Reads continue throughout. At the cutover the old instance is fenced read-only and existing client connections are closed, so writes pause for that moment and the application has to reconnect. The target version must be higher than the current one:

Before a major version upgrade, check that your installed extensions support the target version.

Pause and resume

Database settings status card
Database settings status card

A paused database stops its compute but keeps its storage, configuration, and credentials. Pause a database you are not using to stop paying for compute; resume it when you need it again. In the Console, open Settings > General and use the Running toggle in the Details card, then click Update to apply it. From the API, update the status:

Set status back to ready to resume. Both transitions are asynchronous: the request returns immediately and the database moves through pausing or resuming before settling. A database in the failed state can also be recovered by setting its status to ready.

Lifecycle states

StatusMeaning
provisioningBeing created
readyOnline and accepting connections
scalingA configuration or specification change is being applied
pausingTransitioning to paused
pausedCompute stopped, storage retained
resumingTransitioning back to ready
restoringA backup or point-in-time restore is in progress
upgradingAn engine version upgrade is in progress
migratingA migration is in progress
failing-overA replica is being promoted to primary
inactiveIdle and scaled down to zero
deletingDeletion is in progress
deletedDeletion has finished
failedAn infrastructure error occurred; the database can be resumed

Deleting a database

Delete a database from Settings > General in the Console, or programmatically. The database moves to deleting and the teardown runs in the background. Deleting a database also deletes its backups, so export anything you need first.

Was this page helpful?

Share what worked or what we should fix. Once approved, our agents automatically apply suggested updates to the docs.