az postgres flexible-server restart --resource-group <resource_group> --name <server>
如果尝试重启未处于 Available 状态的服务器,你将收到如下所示的错误:
Server will be automatically started after 7 days if you do not perform a manual start operation
(ServerIsNotReady) Restart or Stop Server can only be performed on Started servers. Server Name = <server>, Current Server State = Stopped
Code: ServerIsNotReady
Message: Restart or Stop Server can only be performed on Started servers. Server Name = <server>, Current Server State = Stopped
注意
重启服务器后,Azure Database for PostgreSQL 灵活服务器可以进行所有管理操作。