PostgreSQL pg_postmaster_start_time() Function
The PostgreSQL pg_postmaster_start_time() function returns the time the server was started.
pg_postmaster_start_time() Syntax
Here is the syntax of the PostgreSQL pg_postmaster_start_time() function:
pg_postmaster_start_time() -> timestamp with time zone
Parameters
The PostgreSQL pg_postmaster_start_time() function does not require any parameters.
Return value
The PostgreSQL pg_postmaster_start_time() function returns a time with time zone information, which is the time the server was started.
pg_postmaster_start_time() Examples
To get the current server startup time, use the following statement with the pg_postmaster_start_time() function:
SELECT pg_postmaster_start_time();
   pg_postmaster_start_time
-------------------------------
 2022-07-13 13:40:57.323244+08Note that your values may vary.