---
title: "Apply Maintenance Updates"
description: "Read pending maintenance updates on Managed PostgreSQL, move the weekly maintenance window, or apply pending updates now with the Exoscale API."
url: https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/apply-maintenance-updates/
product: "PostgreSQL"
section: product
last_updated: 2026-11-10
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Apply Maintenance Updates

Managed PostgreSQL receives platform updates, such as operating system patches and PostgreSQL minor versions, during a weekly maintenance window set per service. This page shows the PostgreSQL commands to read the window and the pending updates, move the window, and start pending updates before the window.

How maintenance works for every DBaaS engine, including how nodes are replaced, is described on
[Manage maintenance windows](https://community.exoscale.com/product/dbaas/how-to/maintenance-windows/index.md).

> [!IMPORTANT]
> Major version upgrades are not maintenance updates and never run in the window. You start them
> yourself, see
> [Upgrade to a new PostgreSQL major version](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/upgrade-major-version/index.md).

## Read the Window and the Pending Updates

The service overview shows the window:

```bash
exo dbaas show SERVICE_NAME -z ZONE
```

Parameters:

- `SERVICE_NAME`: name of the service, for example `my-postgresql`.
- `ZONE`: zone of the service, for example `ch-gva-2`.

The `Maintenance` row shows the day and the start time in UTC, for example `sunday (03:00:00)`. A
new service gets a window chosen by the platform.

The API also returns the updates waiting to be installed:

```bash
exo api get-dbaas-service-pg SERVICE_NAME -z ZONE -q 'maintenance'
```

```json
{
  "dow": "sunday",
  "time": "03:00:00",
  "updates": []
}
```

An empty `updates` array means nothing is pending. Each pending update has, according to the API
schema, a `description`, a `deadline` (the date by which it must be installed), a `start-after`
(the earliest time it is applied automatically) and a `start-at` (the time it is applied
automatically).

## Change the Window

```bash
exo dbaas update SERVICE_NAME -z ZONE -f \
  --maintenance-dow DAY \
  --maintenance-time TIME
```

Parameters:

- `SERVICE_NAME`: name of the service, for example `my-postgresql`.
- `ZONE`: zone of the service, for example `ch-gva-2`.
- `DAY`: day of the week, `monday` to `sunday`.
- `TIME`: start time in UTC, exactly `HH:MM:SS`, for example `03:00:00`.

Pass both flags together. With only one, the command fails with
`both --maintenance-dow and --maintenance-time must be specified`. A time such as `3:00` is
rejected: the value must be eight characters long.

The CLI help lists `never` as a value for `--maintenance-dow`, but the API refuses it with
`'never' maintenance option is currently not supported, only specific days of the week`. Every
service keeps a weekly window.

> [!TIP]
> The time you set is when maintenance may start, not a slot with a guaranteed end. Put it at the
> beginning of your quiet period.

The window is a property of the service: a [fork](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/fork-a-service/index.md)
does not inherit it from its source. Set it on each service you create, with the same flags on
`exo dbaas create`.

## Apply Pending Updates Now

There is no `exo dbaas` command for this. Use the API operation:

```bash
exo api start-dbaas-pg-maintenance SERVICE_NAME -z ZONE
```

Parameters:

- `SERVICE_NAME`: name of the service, for example `my-postgresql`.
- `ZONE`: zone of the service, for example `ch-gva-2`.

The operation starts the pending updates immediately instead of waiting for the window. Read
`maintenance.updates` first so you know what it will install.

Starting maintenance yourself is also how you test an update before production receives it: start
it on a staging service, verify the application, then start it on production or let the
production window apply it.

## Prepare the Application

Maintenance can replace the nodes of the service. The hostname and port do not change, but the IP
address behind the hostname does, and the sessions open on a replaced node end. The same happens
during a [plan change](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/change-the-plan/index.md#what-a-plan-change-does-to-your-connections).

- Connect by hostname. An IP address pinned in an application or in a firewall rule stops working
  after the next node replacement.
- Make the application open a new connection when one dies.

## Related Pages

- [Manage maintenance windows](https://community.exoscale.com/product/dbaas/how-to/maintenance-windows/index.md)
- [Upgrade to a new PostgreSQL major version](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/upgrade-major-version/index.md)
- [Change the service plan](https://community.exoscale.com/product/dbaas/service-specific/postgresql/how-to/change-the-plan/index.md)
- [Service level agreement](https://community.exoscale.com/product/dbaas/service-boundaries/sla/index.md)

