添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

HI Team,

Ca someone advise me the Azure CLI commands to do below for Azure PostgreSQL Flexible server

  • Planned failover
  • Forced failover
  • I am not very sure with the following commands from here - https://learn.microsoft.com/en-us/cli/azure/postgres/flexible-server?view=azure-cli-latest#az-postgres-flexible-server-restart

    The reason being, why a forced/planned failover require 'restart'? the "failover planned" and "failover forced " are part of the restart command. is it the right way to do it?

    az postgres flexible-server restart --resource-group testGroup --name testserver --failover Planned

    az postgres flexible-server restart --resource-group testGroup --name testserver --failover Forced

    @subhash-DBA
    Thank you for the question and for using Microsoft Q&A platform.
    The commands you mentioned for planned and forced failover are indeed correct. In Azure PostgreSQL Flexible Server, failover operations are integrated into the restart command. This is because a failover involves switching the primary server to a standby server, which inherently requires a restart of the server to complete the process.

    Why Restart is Required:

    Planned Failover: This is used for maintenance or testing purposes and ensures minimal downtime by gracefully switching the primary server to the standby server.

    Forced Failover: This is used in emergency situations where the primary server is unresponsive. It forces the failover to the standby server, which might result in some data loss but ensures high availability.

    The restart command with the --failover option ensures that the failover process is handled correctly, maintaining the integrity and availability of your database.

    Hope this helps. Do let us know if you have any further queries.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.