Initiated reboot of PostgreSQL server and it stuck in ‘restarting’ state. How to recover my PostgreSQL server?

Rahul
1 min readDec 5, 2020

I had encountered an issue where due to some reason, I had initiated the reboot of PostgreSQL server, but it never came back. It just stuck in ‘restarting’ state for whatever reason.

Now, since the infrastructure is owned by the Microsoft, I had to reach them to find what’s happening with my server, but in the meantime, we also have an option to restore the server with an off course different name. (Point in time restore from our main server)

Azure Database for PostgreSQL allows us to restore the server back to a point-in-time and into to a new copy of the server.

The one issue of restoring server with a different name would be, we need to modify all our application connection string to the new server, but we can restore all our important data and database till Microsoft takes an action on our main server

Here is the official document “How to backup and restore a server in Azure Database for PostgreSQL — Single Server using the Azure portal”

https://docs.microsoft.com/en-us/azure/postgresql/howto-restore-server-portal#point-in-time-restore

Note-Just ensure that we should use the new server name when performing the PITR.

I believe to initiate the restore operation till Microsoft recover our main server would be a good solution. And once our main server back, we can delete the restore one.

--

--