pg_stat_progress_basebackup
用于 reporting pg_basebackup 进度的视图
pg_stat_progress_basebackup 是一个 进度报告视图,提供有关 pg_basebackup 操作进度的信息。
pg_stat_progress_basebackup 在 PostgreSQL 13 中添加。
按 PostgreSQL 版本定义
pg_stat_progress_basebackup (PostgreSQL 19)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 18)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 17)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 16)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 15)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 14)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
pg_stat_progress_basebackup (PostgreSQL 13)
View "pg_catalog.pg_stat_progress_basebackup"
Column | Type | Collation | Nullable | Default
----------------------+---------+-----------+----------+---------
pid | integer | | |
phase | text | | |
backup_total | bigint | | |
backup_streamed | bigint | | |
tablespaces_total | bigint | | |
tablespaces_streamed | bigint | | |
变更历史
- PostgreSQL 19
- 添加了 column
backup_type(commit deb67445)
- 添加了 column
- PostgreSQL 13
- 添加 (commit e65497df)
示例
pg_stat_progress_basebackup 的示例输出
postgres=# SELECT * FROM pg_stat_progress_basebackup \x\g\x -[ RECORD 1 ]--------+------------------------- pid | 29070 phase | streaming database files backup_total | 2179629568 backup_streamed | 945447936 tablespaces_total | 1 tablespaces_streamed | 0
参考资料
- PostgreSQL documentation: pg_stat_progress_basebackup
