pg_integrity_checksums
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_integrity_checksums | 2.0.0 | ADMIN | MIT | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 5115 | pg_integrity_checksums | 否 | 是 | 否 | 是 | 否 | 是 | - |
| 相关扩展 | amcheck pg_checksums |
|---|
Former pg_checksums SQL extension, unrelated to the core/PGDG utility. Old/new extensions cannot share a schema; follow MIGRATION.md. Superuser install; relation checks enforce SELECT and reject RLS; database checks require superuser. Logical checksums compare content; physical checksums depend on storage. PG14-18.
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 2.0.0 | 1817161514 | pg_integrity_checksums | - |
| RPM | PIGSTY | 2.0.0 | 1817161514 | pg_integrity_checksums_$v | - |
| DEB | PIGSTY | 2.0.0 | 1817161514 | postgresql-$v-pg-integrity-checksums | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.0.0 el8.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.0.0 el8.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.0.0 el8.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.0.0 el8.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.0.0 el8.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 2.0.0 el8.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.0.0 el8.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.0.0 el8.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.0.0 el8.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.0.0 el8.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 2.0.0 el9.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.0.0 el9.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.0.0 el9.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.0.0 el9.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.0.0 el9.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 2.0.0 el9.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.0.0 el9.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.0.0 el9.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.0.0 el9.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.0.0 el9.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 2.0.0 el10.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.0.0 el10.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.0.0 el10.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.0.0 el10.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.0.0 el10.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 2.0.0 el10.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.0.0 el10.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.0.0 el10.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.0.0 el10.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.0.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.0.0 el10.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.0.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 2.0.0 d12.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.0.0 d12.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.0.0 d12.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.0.0 d12.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.0.0 d12.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 2.0.0 d12.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.0.0 d12.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.0.0 d12.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.0.0 d12.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.0.0 d12.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 2.0.0 d13.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.0.0 d13.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.0.0 d13.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.0.0 d13.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.0.0 d13.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 2.0.0 d13.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.0.0 d13.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.0.0 d13.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.0.0 d13.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.0.0 d13.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 2.0.0 u22.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.0.0 u22.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.0.0 u22.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.0.0 u22.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.0.0 u22.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 2.0.0 u22.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.0.0 u22.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.0.0 u22.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.0.0 u22.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.0.0 u22.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 2.0.0 u24.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.0.0 u24.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.0.0 u24.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.0.0 u24.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.0.0 u24.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 2.0.0 u24.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.0.0 u24.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.0.0 u24.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.0.0 u24.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.0.0 u24.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 2.0.0 u26.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.0.0 u26.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.0.0 u26.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.0.0 u26.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.0.0 u26.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 2.0.0 u26.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.0.0 u26.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.0.0 u26.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.0.0 u26.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.0.0 u26.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.0.0-1PGSTY~resolute_arm64.deb
|
构建
您可以使用 pig build 命令构建 pg_integrity_checksums 扩展的 RPM / DEB 包:
安装
您可以直接安装 pg_integrity_checksums 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
使用 pig 或者是 apt/yum/dnf 安装扩展:
创建扩展:
用法
来源:
pg_integrity_checksums 为 PostgreSQL 页面、单元、元组、表、索引和数据库计算物理及逻辑校验和。它是面向 PostgreSQL 12–18 的 C 扩展,会直接读取关系存储,因此安装和数据库级扫描需要超级用户。
安装与迁移
2.0.0 是旧 pg_checksums 扩展的重命名延续。PostgreSQL 不支持 ALTER EXTENSION ... RENAME;应先检查依赖对象,删除旧扩展,再创建新扩展,并在使用前修改 GUC 前缀:
旧名和新名不能共存,因为它们定义相同的 SQL 函数。PostgreSQL 核心自带的 pg_checksums 工具是另一套独立程序。
校验和层级
内容比较使用逻辑校验和,存储完整性检查使用物理校验和。逻辑表校验和不要求主键,保留重复行,并排除关系和元组标识符。逻辑索引校验和由可见表行和索引定义计算,因此在 VACUUM、CLUSTER 和 REINDEX 后保持稳定。
物理校验和包含存储细节,在 VACUUM FULL、CLUSTER、REINDEX 或其他物理重写后可能变化。需要跟踪这些变化时,使用页面、元组和表级物理函数。
权限与维护
关系级函数要求调用者拥有关系的 SELECT 权限,并拒绝受行级安全策略保护的关系,因为直接存储扫描无法应用 RLS。数据库级函数只允许超级用户执行。pg_integrity_checksums.workers 控制并行扫描,pg_integrity_checksums.strict 使数据库扫描在关系无法检查时失败,而不是跳过。扩展不要求共享预加载,但应依据发行说明在相关实现变化后重新计算物理基线。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)