Edit

Schedule maintenance

You can specify scheduled maintenance options for each Azure Database for PostgreSQL flexible server in your Azure subscription. Options include the type of scheduled maintenance and notification settings for upcoming and finished maintenance events.

Steps to schedule maintenance

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server.

  2. In the resource menu, under the Settings section, select Maintenance.

    Screenshot showing the Maintenance page.

  3. If you select System-managed schedule, the system automatically assigns a random day of the week, and a 60-minute window that begins somewhere between 11 PM and 7 AM (local server time).

    Screenshot showing the selection of system managed schedule in Maintenance page.

  4. If you want more granular control, select Custom schedule.

    Screenshot showing the selection of custom schedule in Maintenance page.

  5. Select a preferred day of the week, and a start time for the 60-minute window in which you want maintenance to occur.

    Screenshot showing the selection of custom day of the week and start time for the maintenance window.

  6. Select Save.

    Screenshot showing how to save configuration changes made to Maintenance page.

  7. Make sure that you understand the implications of changing the currently configured schedule and confirm the operation or cancel it.

    Screenshot showing how to confirm or cancel configuration changes made to Maintenance schedule.

  8. A notification informs you that the service is updating the maintenance window settings.

    Screenshot showing the notification informing that configuration changes are being applied.

  9. When the operation finishes, a notification informs you that the service completed the update of the maintenance window settings.

    Screenshot showing the notification informing that configuration changes were successfully applied.

Steps to view upcoming maintenance

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server.

  2. On the server Overview page, review the Next maintenance field. If upcoming maintenance is available, the Next maintenance field displays the scheduled maintenance time.

    Screenshot showing the next maintenance date.

  3. Select the Next maintenance value to open the Maintenance page.

  4. On the Maintenance page, review the Maintenance status section. That section shows upcoming maintenance events that apply to your server, including the scheduled time, status, maintenance type, and available actions.

    Screenshot showing upcoming maintenance.

Steps to reschedule maintenance to a future date

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server.

  2. In the resource menu, under the Settings section, select Maintenance.

  3. In the Maintenance status section, review the upcoming maintenance event.

  4. If the event is eligible, select Reschedule.

    Screenshot showing the reschedule maintenance button.

  5. Choose an eligible future date and time. Only dates and times that meet the service rules and your maintenance policy are available for selection.

    Screenshot showing eligible reschedule date and time to choose from.

  6. Select Reschedule to confirm the new maintenance time.

    Screenshot showing reschedule to initiate rescheduling.

  7. After confirmation, review the Maintenance status section to verify that the new start time is displayed. The portal shows a confirmation after the maintenance event is successfully rescheduled.

    Screenshot showing reschedule successful.

Troubleshooting

The Reschedule button isn't available

The Reschedule action appears only when there's an upcoming maintenance event and the event is eligible for rescheduling. Some events aren't eligible, especially if they're required for critical security or compliance reasons.

I can't select the date or time I want

You can select only eligible future maintenance slots. The selected time must be within the allowed reschedule window and must comply with the server maintenance policy.

I receive an error that the maintenance window is locked

Rescheduling isn't available starting 15 minutes before the initially scheduled maintenance time. This lock-in period helps maintain service reliability as the maintenance workflow prepares to start.

I receive an error that maintenance can't be rescheduled or applied now because the custom maintenance window was configured after the event was scheduled

Rescheduling is available only for flexible servers that are already on a custom maintenance schedule. Any changes to the maintenance schedule take effect on the next maintenance event.

Steps to apply maintenance on demand

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server.

  2. In the resource menu, under the Settings section, select Maintenance.

  3. In the Maintenance status section, review the upcoming maintenance event.

  4. If the event is eligible, select Reschedule followed by Apply now.

    Screenshot showing apply maintenance now button.

  5. Review the confirmation message. The confirmation dialog explains that maintenance starts immediately and that the server might restart during the maintenance process.

  6. Select Yes - Apply Maintenance Now to start maintenance.

    Screenshot showing apply maintenance now confirmation dialog box.

  7. Monitor the Maintenance status section. The maintenance event status updates as the workflow progresses. When maintenance completes, the status changes to Complete and it moves to the maintenance history section.

    Screenshot showing applying maintenance now.

Steps to view maintenance history

Using the Azure portal:

  1. Select your Azure Database for PostgreSQL flexible server.

  2. In the resource menu, under the Settings section, select Maintenance.

  3. On the Maintenance page, review the Maintenance history section.

    Screenshot showing maintenance history section.

  4. Select a maintenance event Tracking ID to view more details, such as the maintenance type, start time, end time, and final status.

    Screenshot showing maintenance event tracking ID.

  5. Select Export to CSV to download maintenance history.

    Screenshot showing export maintenance history to csv.

Note

If no past maintenance events are available for the server, the maintenance history section might be empty.

Notifications about scheduled maintenance events

You can use Azure Service Health to view notifications about upcoming and performed scheduled maintenance on your Azure Database for PostgreSQL flexible server.

You can also set up alerts in Azure Service Health to get notifications about maintenance events.