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, with no read or write outage:

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, use the Running toggle on the Settings page. 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
failedAn infrastructure error occurred; the database can be resumed

Deleting a database

Delete a database from Settings > Delete database in the Console, or programmatically. Deletion stops billing and invalidates the credentials immediately. 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.