Edit

Schedule maintenance

You can specify scheduled maintenance options for each Azure Database for PostgreSQL flexible server instance 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 instance.

  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 which begins somewhere between 11pm and 7am (local server time).

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

  4. If you want to have 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. A notification informs you that the service is updating the maintenance window settings.

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

  8. Once the operation ends, 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

  1. In the Azure portal, go to 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.

    The Maintenance status 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

  1. In the Azure portal, go to your Azure Database for PostgreSQL flexible server.

  2. In the left menu, under Settings, 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 is an upcoming maintenance event and the event is eligible for rescheduling. Some events might not be eligible, especially if they are required for critical security or compliance reasons.

I can't select the date or time I want

Only eligible future maintenance slots are selectable. 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 is unavailable 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 which are already on custom maintenance schedule. Any changes to maintenance schedule will take effect on the next maintenance event.

Steps to apply maintenance on-demand

  1. In the Azure portal, go to your Azure Database for PostgreSQL flexible server.

    In the left menu, under Settings, select Maintenance.

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

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

    Screenshot showing apply maintenance now button.

  4. Review the confirmation message.

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

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

    Screenshot showing apply maintenance now confirmation dialog box.

  6. Monitor the Maintenance status section.

    The maintenance event status updates as the workflow progresses. When maintenance completes, the status changes to Complete and it is moved to the maintenance history section

    Screenshot showing applying maintenance now.

Steps to view maintenance history

  1. In the Azure portal, go to your Azure Database for PostgreSQL flexible server.

    In the left menu, under Settings, select Maintenance.

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

    Screenshot showing maintenance history section.

  3. 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.

  4. 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 instance.

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