pg_integrity_checksums
概览
| 扩展包名 | 版本 | 分类 | 许可证 | 语言 |
|---|---|---|---|---|
pg_integrity_checksums | 2.1.0 | ADMIN | MIT | C |
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 5115 | pg_integrity_checksums | 否 | 是 | 否 | 是 | 否 | 是 | - |
| 相关扩展 | amcheck pg_checksums |
|---|
Former pg_checksums; superuser install; relation checks require SELECT and reject RLS. 2.1.0 canonicalizes logical byte order; upgrades from 2.0.0 must recompute Hash-index and system-inclusive baselines.
版本
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 2.1.0 el8.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.1.0 el8.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.1.0 el8.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.1.0 el8.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 2.1.0 el8.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el8.x86_64.rpm
|
| el8.aarch64 | PIGSTY 2.1.0 el8.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.1.0 el8.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.1.0 el8.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.1.0 el8.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 2.1.0 el8.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el8.aarch64.rpm
|
| el9.x86_64 | PIGSTY 2.1.0 el9.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.1.0 el9.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.1.0 el9.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.1.0 el9.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 2.1.0 el9.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el9.x86_64.rpm
|
| el9.aarch64 | PIGSTY 2.1.0 el9.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.1.0 el9.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.1.0 el9.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.1.0 el9.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 2.1.0 el9.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el9.aarch64.rpm
|
| el10.x86_64 | PIGSTY 2.1.0 el10.x86_64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.1.0 el10.x86_64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.1.0 el10.x86_64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.1.0 el10.x86_64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 2.1.0 el10.x86_64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el10.x86_64.rpm
|
| el10.aarch64 | PIGSTY 2.1.0 el10.aarch64.pg18 : pg_integrity_checksums_18 pg_integrity_checksums_18-2.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.1.0 el10.aarch64.pg17 : pg_integrity_checksums_17 pg_integrity_checksums_17-2.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.1.0 el10.aarch64.pg16 : pg_integrity_checksums_16 pg_integrity_checksums_16-2.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.1.0 el10.aarch64.pg15 : pg_integrity_checksums_15 pg_integrity_checksums_15-2.1.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 2.1.0 el10.aarch64.pg14 : pg_integrity_checksums_14 pg_integrity_checksums_14-2.1.0-1PGSTY.el10.aarch64.rpm
|
| d12.x86_64 | PIGSTY 2.1.0 d12.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.1.0 d12.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.1.0 d12.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.1.0 d12.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 2.1.0 d12.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_amd64.deb
|
| d12.aarch64 | PIGSTY 2.1.0 d12.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.1.0 d12.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.1.0 d12.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.1.0 d12.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 2.1.0 d12.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~bookworm_arm64.deb
|
| d13.x86_64 | PIGSTY 2.1.0 d13.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.1.0 d13.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.1.0 d13.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.1.0 d13.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
| PIGSTY 2.1.0 d13.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~trixie_amd64.deb
|
| d13.aarch64 | PIGSTY 2.1.0 d13.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.1.0 d13.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.1.0 d13.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.1.0 d13.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
| PIGSTY 2.1.0 d13.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~trixie_arm64.deb
|
| u22.x86_64 | PIGSTY 2.1.0 u22.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.1.0 u22.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.1.0 u22.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.1.0 u22.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
| PIGSTY 2.1.0 u22.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~jammy_amd64.deb
|
| u22.aarch64 | PIGSTY 2.1.0 u22.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.1.0 u22.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.1.0 u22.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.1.0 u22.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
| PIGSTY 2.1.0 u22.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~jammy_arm64.deb
|
| u24.x86_64 | PIGSTY 2.1.0 u24.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.1.0 u24.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.1.0 u24.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.1.0 u24.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
| PIGSTY 2.1.0 u24.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~noble_amd64.deb
|
| u24.aarch64 | PIGSTY 2.1.0 u24.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.1.0 u24.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.1.0 u24.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.1.0 u24.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
| PIGSTY 2.1.0 u24.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~noble_arm64.deb
|
| u26.x86_64 | PIGSTY 2.1.0 u26.x86_64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.1.0 u26.x86_64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.1.0 u26.x86_64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.1.0 u26.x86_64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
| PIGSTY 2.1.0 u26.x86_64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.0-1PGSTY~resolute_amd64.deb
|
| u26.aarch64 | PIGSTY 2.1.0 u26.aarch64.pg18 : postgresql-18-pg-integrity-checksums postgresql-18-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.1.0 u26.aarch64.pg17 : postgresql-17-pg-integrity-checksums postgresql-17-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.1.0 u26.aarch64.pg16 : postgresql-16-pg-integrity-checksums postgresql-16-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.1.0 u26.aarch64.pg15 : postgresql-15-pg-integrity-checksums postgresql-15-pg-integrity-checksums_2.1.0-1PGSTY~resolute_arm64.deb
| PIGSTY 2.1.0 u26.aarch64.pg14 : postgresql-14-pg-integrity-checksums postgresql-14-pg-integrity-checksums_2.1.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–19 上游版本的 C 扩展;Pigsty 软件包覆盖 PostgreSQL 14–18,会直接读取关系存储,因此安装和数据库级扫描需要超级用户。
安装与迁移
2.0.2 版本
2.0.2 通过适配数组迭代器和表扫描调用,增加对 PostgreSQL 19 API 的兼容。该版本不改变 SQL 对象,2.0.1 到 2.0.2 的 SQL 升级为空操作。Pigsty 构建覆盖 PostgreSQL 14–18。
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 使数据库扫描在关系无法检查时失败,而不是跳过。扩展不要求共享预加载,但应依据发行说明在相关实现变化后重新计算物理基线。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)