How to Schedule Automatic Software Updates for PostgreSQL Database Clusters
Validated on 2 Aug 2019 • Last edited on 18 Dec 2024
PostgreSQL is an open source, object-relational database built for extensibility, data integrity, and speed. Its concurrency support makes it fully ACID-compliant, and it supports dynamic loading and catalog-driven operations to let users customize its data types, functions, and more.
DigitalOcean fully manages database software updates for database clusters on your behalf. During the update process, we create a new cluster with OS-level or db_engine updates applied, replicate the existing cluster’s data, and then update DNS (which changes the cluster’s underlying IP address).
There is no downtime associated with these updates, but there may be brief periods of latency during the maintenance window. Updates are necessary for security and stability, so you can’t disable them, but you can customize the maintenance window or manually initiate an available update.
Set a Maintenance Window Using the CLI
How to Set a Maintenance Window Using the DigitalOcean CLI
The maintenance window for a cluster applies to its primary node and any standby nodes. Each read-only node has its own maintenance window that is independent of the cluster and other read-only nodes.
You can view or edit a cluster or read-only node’s current maintenance window from its Settings page, in the Maintenance Window section.
Software updates may begin at any time in the 4-hour period after the maintenance window’s start time. For example, a maintenance window defined for Sundays at 7 PM will have updates at any time between 7 PM and 11 PM.
To change a cluster or read-only node’s maintenance window, click Edit.
Choose the day of the week and the start time for the 4-hour maintenance window, then click Save.
Update Manually
When new updates are available, cluster and read-only node Overview pages have a banner with basic information on the update.
Click Update Now to open the Required maintenance window. This window specifies when the updates will be automatically applied.
If you want to initiate the update immediately ahead of the scheduled maintenance window, click the Start Maintenance button. To manually update read-only nodes, you need to repeat this process for each individual node.