My Board
How to Check PostgreSQL Status - Printable Version

+- My Board (https://ellohost.com/forum)
+-- Forum: Tutoriel EN (https://ellohost.com/forum/forumdisplay.php?fid=8)
+--- Forum: Others (https://ellohost.com/forum/forumdisplay.php?fid=20)
+--- Thread: How to Check PostgreSQL Status (/showthread.php?tid=760)



How to Check PostgreSQL Status - aaron - 09-08-2023



    How to Check PostgreSQL Status

   

After installing PostgreSQL, check whether it is enabled and active. Use the systemctl or service command utility to verify the service status:


   
sudo service postgresql status

   
sudo systemctl status postgresql

   

If PostgreSQL is enabled, your command line will output active and loaded, similar to the following:

   

   

In addition to the service status, check whether PostgreSQL is ready to accept a connection using this command:


   
sudo pg_isready