pg_postmaster_start_time()

一个返回主服务器进程启动时间的函数

pg_postmaster_start_time() 是一个系统函数,它返回主服务器进程的启动时间,数据类型为 TIMESTAMP WITH TIME ZONE(带时区的日期时间戳)。

pg_postmaster_start_time() 函数是在 PostgreSQL 8.1 中添加的。

用法

pg_postmaster_start_time() → timestamp with time zone

pg_postmaster_start_time() 返回 PostgreSQL 本身的启动时间。

要获取单个后端进程的启动时间,请参阅 pg_stat_activitybackend_start 列,或者使用 pg_stat_get_backend_start() 函数。

变更历史

示例

postgres=# SELECT pg_postmaster_start_time();
   pg_postmaster_start_time    
-------------------------------
 2020-09-12 13:39:35.376203+00
(1 row)

分类

系统函数

另请参阅

pg_conf_load_time()

反馈

请在此处 提交关于“pg_postmaster_start_time()”的任何评论、建议或更正