# Upgrade and Maintenance

## PostgreSQL upgrades

<code class="expression">space.vars.ionos\_cloud</code> performs regular updates and patches on your PostgreSQL database cluster to maintain security and stability. These updates include minor PostgreSQL patches and operating system updates.

Most updates apply without service interruption. In some cases, a brief restart of the PostgreSQL instance is necessary for the changes to take effect. Any such restarts occur only during the scheduled weekly four-hour maintenance window.

When your cluster only contains one replica, you might experience a short downtime during this maintenance window, while your database instance is being updated. In a replicated cluster, we only update standbys, but we might perform a switchover to change the leader node. For more information, see [<mark style="color:blue;">Setting Maintenance Windows</mark>](/cloud/databases/postgresql/api/v1-api/modify-cluster-attributes/set-a-postgresql-maintenance-window.md).

To upgrade from an earlier PostgreSQL release, data must be migrated using `pg_dumpall`, `pg_upgrade`, or logical replication.

**Considerations:** Updates to a new minor version are always backward compatible. Such updates are done during the maintenance window with no additional actions from the user side.

### Major version upgrades

{% hint style="danger" %}
**Caution:** Major changes of the PostgreSQL version are irreversible and can fail. You should read the official migration guide and test major version upgrades with an appropriate development cluster first.
{% endhint %}

You can upgarde your PostgreSQL version using either [<mark style="color:blue;">DCD</mark>](/cloud/databases/postgresql/how-tos/modify-cluster.md) or [<mark style="color:blue;">API</mark>](/cloud/databases/postgresql/api/v1-api/modify-cluster-attributes.md).

#### Availability considerations

During the upgrade process, the database may become temporarily unavailable for a short duration. The exact downtime depends on factors such as cluster size and workload.

To minimize the impact on applications and users, it is strongly recommended to schedule the upgrade during a [<mark style="color:blue;">Maintenance Window</mark>](/cloud/databases/postgresql/overview/maintenance-window.md), which is a predefined time designated for system updates and operational tasks.

#### Prerequisites

* Test the upgrade on the development cluster with similar or the same data by creating a new database cluster as a clone of your existing cluster.
* Prepare for a downtime during the major version upgrade.
* Ensure the database cluster has enough available storage. While the upgrade is space-efficient and does not copy the data directory, some temporary data is written to disk.

Before upgrading to major PostgreSQL versions, verify and ensure that the migration does not impact your operations. <code class="expression">space.vars.ionos\_cloud</code> does not assume responsibility for your data or utilized functionality during this process.

{% hint style="info" %}
**Note:** According to the official [<mark style="color:blue;">PostgreSQL Documentation</mark>](https://www.postgresql.org/docs/current/upgrading.html), new major versions can introduce user-visible incompatibilities that may require application changes.
{% endhint %}

## Supported versions

Starting with version 10, PostgreSQL moved to a yearly release schedule, where each major version is supported for 5 years after initial release. For more information, refer to the [<mark style="color:blue;">PostgreSQL Documentation</mark>](https://www.postgresql.org/support/versioning/). We strive to support new versions as soon as possible.

{% hint style="info" %}
**Note:** PostgreSQL 16 version support is now available. To learn about upgrading to this version, see [<mark style="color:blue;">PostgreSQL 16 Upgrade Management</mark>](/cloud/databases/postgresql/overview/upgrade-maintenance/postgresql16-upgrade-management.md).
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cloud/databases/postgresql/overview/upgrade-maintenance.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
