Windows
1. Stop tomcat
Double click on Apache Tomcat Properties in system tray. In General tab, click Stop to stop tomcat service.
2. Stop postgresql
Open Command Prompt or Windows PowerShell with admin privileges and type: net stop postgresql-x64-9.5
3. Start postgresql
net start postgresql-x64-9.5
4. Start tomcat
In General tab of Apache Tomcat Properties, click Start to start tomcat service.