How come I can't restart the PostgreSQL service?
I tried starting the PostgreSQL Service from Windows Services, but it did not start and the following message appears:
The postgresql-x64-9.6 service on Local Computer started and then stopped. Some services stop automatically if they are not in use by other services or programs.

To solve this issue try the following:
Kill all the "PostgreSQL Server" processes in the Task Manager. You can do this manually or via the following administrator command prompt:
>taskkill /IM "PostgreSQL Server"Restart the host machine.