Thursday, October 19, 2023

How to know Postgresql server uptime ?

 

Login as privileged user to database 


Query :


SELECT pg_postmaster_start_time();



output :


demo1=> SELECT pg_postmaster_start_time();

   pg_postmaster_start_time

-------------------------------

 2023-10-19 08:46:45.432054+00

(1 row)



demo1=>

No comments:

Post a Comment

How to switch/connect with other database (demo)?

  postgres=# postgres=# postgres=# postgres=# \c demo You are now connected to database "demo" as user "postgres". demo=...