pgtelemetry
监控数据库活动、WAL、复制与存储的 SQL 视图
pgtelemetry · 监控数据库活动、WAL、复制与存储的 SQL 视图
概览
| ID | 扩展 | 软件包 | 版本 | 类别 | 许可证 | 编程语言 |
|---|---|---|---|---|---|---|
| 6080 | pgtelemetry | pgtelemetry | 1.7 | STAT | PostgreSQL | SQL |
| 属性 | 可执行文件 | 动态库 | 需要预加载 | 需要建扩展 | 可迁移 | 可信 |
|---|---|---|---|---|---|---|
| ----d-- | 否 | 否 | 否 | 是 | 否 | 否 |
| 关联 | |
|---|---|
| 模式 | pgtelemetry |
| 依赖 | pg_stat_statements plpgsql |
| 相关扩展 | pgmonitor pg_stat_statements pg_profile powa pgexporter_ext |
Pure SQL in the fixed pgtelemetry schema; requires pg_stat_statements and plpgsql. Preload pg_stat_statements, not pgtelemetry. Control/SQL are 1.7 while META.json still says 1.6.0; upstream CI stops at PG17, and PG14-18 are verified in PGSTY builds.
软件包
| Linux / PG | PG19 | PG18 | PG17 | PG16 | PG15 |
|---|---|---|---|---|---|
| el8.x86_64 | N/A | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el8.aarch64 | N/A | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el9.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el9.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el10.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| el10.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| d12.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| d12.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| d13.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| d13.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u22.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u22.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u24.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u24.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u26.x86_64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
| u26.aarch64 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 | PIGSTY 1.7 |
源码
安装
在数据库中创建扩展。
用法
来源:
pgtelemetry 1.7 版是纯 SQL 监控集合。视图和函数汇总关系/数据库/表空间大小、连接和等待、锁、表访问和自动清理、pg_stat_statements 计时与缓冲区、WAL 速率、复制槽及备库延迟。
示例
先预加载并安装 pg_stat_statements,再把该扩展安装到固定的 pgtelemetry 模式:
安装仅限超级用户。若干对象会暴露集群范围的查询文本、客户端地址、大小、锁、复制状态和其他运维元数据;wal_telemetry() 还会维护历史表。只应向监控角色授予所需的具体视图/函数,保护导出的指标,为 WAL 样本设置保留策略,并考虑轮询成本和 PostgreSQL 版本间统计目录变化。