PostgreSQL-17-beta1版本目前已经发布了,每个版本随着功能的增加和一些相关优化,会对部分视图进行调整,以及增加新的视图。
postgres<17beta1>(ConnAs[postgres]:PID[21362] 2024-05-28/13:19:58)=# select version();
+------------------------------------------------------------------------------------------------------------+
| version |
+------------------------------------------------------------------------------------------------------------+
| PostgreSQL 17beta1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44), 64-bit |
+------------------------------------------------------------------------------------------------------------+
(1 row)
postgres<17beta1>(ConnAs[postgres]:PID[21362] 2024-05-28/13:20:02)=# select * from pg_control_system();
+--------------------+--------------------+---------------------+--------------------------+
| pg_control_version | catalog_version_no | system_identifier | pg_control_last_modified |
+--------------------+--------------------+---------------------+--------------------------+
| 1300 | 202405161 | 7373892286583727603 | 2024-05-28 11:57:26+08 |
+--------------------+--------------------+---------------------+--------------------------+
(1 row)
目前的PostgreSQL-17-beta1新版本新增了两个视图,分别为pg_wait_events和pg_stat_checkpointer。pg_stat_checkpointer视图包含检查点信息,pg_wait_events 主要包含等待事件的描述。
postgres<17beta1>(ConnAs[postgres]:PID[21590] 2024-05-28/13:37:39)=# \d pg_stat_checkpointer
View "pg_catalog.pg_stat_checkpointer"
+---------------------+--------------------------+-----------+----------+---------+
| Column | Type | Collation | Nullable | Default |
+---------------------+--------------------------+-----------+----------+---------+
| num_timed | bigint | | | |
| num_requested | bigint | | | |
| restartpoints_timed | bigint | | | |
| restartpoints_req | bigint | | | |
| restartpoints_done | bigint | | | |
| write_time | double precision | | | |
| sync_time | double precision | | | |
| buffers_written | bigint | | | |
| stats_reset | timestamp with time zone | | | |
+---------------------+--------------------------+-----------+----------+---------+
postgres<17beta1>(ConnAs[postgres]:PID[21590] 2024-05-28/13:37:42)=# \d pg_wait_events
View "pg_catalog.pg_wait_events"
+-------------+------+-----------+----------+---------+
| Column | Type | Collation | Nullable | Default |
+-------------+------+-----------+----------+---------+
| type | text | | | |
| name | text | | | |
| description | text | | | |
+-------------+------+-----------+----------+---------+