pg_relusage
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_relusage | 1.0.2 | STAT | PostgreSQL | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 6850 | pg_relusage | 否 | 是 | 是 | 否 | 否 | 是 | - |
| 相关扩展 | pg_qualstats online_advisor hypopg pg_stat_statements index_advisor pg_stat_plans pg_upless pg_hint_plan pg_track_optimizer plan_filter |
|---|
LOAD/preload enables logging; CREATE EXTENSION only records installation.
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 1.0.2 | 1817161514 | pg_relusage | - |
| RPM | PIGSTY | 1.0.2 | 1817161514 | pg_relusage_$v | - |
| DEB | PIGSTY | 1.0.2 | 1817161514 | postgresql-$v-pg-relusage | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 1.0.2 el8.x86_64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.2 el8.x86_64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.2 el8.x86_64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.2 el8.x86_64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el8.x86_64.rpm
| PIGSTY 1.0.2 el8.x86_64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 1.0.2 el8.aarch64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.2 el8.aarch64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.2 el8.aarch64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.2 el8.aarch64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el8.aarch64.rpm
| PIGSTY 1.0.2 el8.aarch64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 1.0.2 el9.x86_64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.2 el9.x86_64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.2 el9.x86_64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.2 el9.x86_64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el9.x86_64.rpm
| PIGSTY 1.0.2 el9.x86_64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 1.0.2 el9.aarch64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.2 el9.aarch64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.2 el9.aarch64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.2 el9.aarch64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el9.aarch64.rpm
| PIGSTY 1.0.2 el9.aarch64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 1.0.2 el10.x86_64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.2 el10.x86_64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.2 el10.x86_64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.2 el10.x86_64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el10.x86_64.rpm
| PIGSTY 1.0.2 el10.x86_64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 1.0.2 el10.aarch64.pg18 : pg_relusage_18 pg_relusage_18-1.0.2-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.2 el10.aarch64.pg17 : pg_relusage_17 pg_relusage_17-1.0.2-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.2 el10.aarch64.pg16 : pg_relusage_16 pg_relusage_16-1.0.2-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.2 el10.aarch64.pg15 : pg_relusage_15 pg_relusage_15-1.0.2-1PGSTY.el10.aarch64.rpm
| PIGSTY 1.0.2 el10.aarch64.pg14 : pg_relusage_14 pg_relusage_14-1.0.2-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 1.0.2 d12.x86_64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.2 d12.x86_64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.2 d12.x86_64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.2 d12.x86_64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~bookworm_amd64.deb
| PIGSTY 1.0.2 d12.x86_64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 1.0.2 d12.aarch64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.2 d12.aarch64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.2 d12.aarch64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.2 d12.aarch64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~bookworm_arm64.deb
| PIGSTY 1.0.2 d12.aarch64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 1.0.2 d13.x86_64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.2 d13.x86_64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.2 d13.x86_64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.2 d13.x86_64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~trixie_amd64.deb
| PIGSTY 1.0.2 d13.x86_64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 1.0.2 d13.aarch64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.2 d13.aarch64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.2 d13.aarch64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.2 d13.aarch64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~trixie_arm64.deb
| PIGSTY 1.0.2 d13.aarch64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 1.0.2 u22.x86_64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.2 u22.x86_64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.2 u22.x86_64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.2 u22.x86_64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~jammy_amd64.deb
| PIGSTY 1.0.2 u22.x86_64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 1.0.2 u22.aarch64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.2 u22.aarch64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.2 u22.aarch64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.2 u22.aarch64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~jammy_arm64.deb
| PIGSTY 1.0.2 u22.aarch64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 1.0.2 u24.x86_64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.2 u24.x86_64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.2 u24.x86_64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.2 u24.x86_64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~noble_amd64.deb
| PIGSTY 1.0.2 u24.x86_64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 1.0.2 u24.aarch64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.2 u24.aarch64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.2 u24.aarch64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.2 u24.aarch64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~noble_arm64.deb
| PIGSTY 1.0.2 u24.aarch64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 1.0.2 u26.x86_64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.2 u26.x86_64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.2 u26.x86_64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.2 u26.x86_64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~resolute_amd64.deb
| PIGSTY 1.0.2 u26.x86_64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 1.0.2 u26.aarch64.pg18 : postgresql-18-pg-relusage postgresql-18-pg-relusage_1.0.2-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.2 u26.aarch64.pg17 : postgresql-17-pg-relusage postgresql-17-pg-relusage_1.0.2-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.2 u26.aarch64.pg16 : postgresql-16-pg-relusage postgresql-16-pg-relusage_1.0.2-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.2 u26.aarch64.pg15 : postgresql-15-pg-relusage postgresql-15-pg-relusage_1.0.2-1PGSTY~resolute_arm64.deb
| PIGSTY 1.0.2 u26.aarch64.pg14 : postgresql-14-pg-relusage postgresql-14-pg-relusage_1.0.2-1PGSTY~resolute_arm64.deb
|
构建
您可以使用 pig build 命令构建 pg_relusage 扩展的 RPM / DEB 包:
安装
您可以直接安装 pg_relusage 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
使用 pig 或者是 apt/yum/dnf 安装扩展:
预加载配置:
用法
来源:
pg_relusage 1.0.2 记录执行计划简化后语句使用的关系,支持 PostgreSQL 10–18,不定义 SQL 对象。加载共享库才会启用功能;可选的 CREATE EXTENSION 仅登记安装状态。
核心用法
运行边界
全部设置都需要超级用户:pg_relusage.enabled 默认 on,pg_relusage.log_level 默认 log,pg_relusage.rel_kinds 默认 riSvmfp。pg_relusage.nested_statements 可选 all(默认,每条语句单独记录)、top(忽略嵌套语句)或 fold(将嵌套关系合并到外层日志)。1.0.1 修复子事务失败后 fold 模式的处理。
用 session_preload_libraries 可在新会话中加载,无需重启;用 shared_preload_libraries 覆盖全部会话则需要重启,应保留已有预加载项。LOAD 通常要求超级用户。日志不包含 SQL 文本,可配置 log_line_prefix 标识客户端。
系统目录不记录。规划或执行器启动时被排除的关系不记录,但执行过程中跳过的分区仍可能出现。向分区表 INSERT 时只记录父表。COMMIT 时的延迟触发器、COPY FROM 触发器及规划器调用的函数按顶层语句处理。DDL 与维护命令不记录。日志中暂未出现某对象,并不足以证明可以删除它。
1.0.2 与分区表
1.0.2 降低了涉及大量分区时的关系集合检查与分区匹配开销,日志格式和配置不变。替换共享库后,使用共享预加载的实例需要重启,使用会话预加载或 LOAD 的连接需要重新连接。若曾用 CREATE EXTENSION 登记安装,还应执行 ALTER EXTENSION pg_relusage UPDATE。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)