macavity
概览
| ID | 扩展名 | Bin | Lib | Load | Create | Trust | Reloc | 模式 |
|---|---|---|---|---|---|---|---|---|
| 5215 | macavity | 否 | 是 | 否 | 是 | 否 | 是 | - |
Testing release; destructive crash action affects the entire instance. Disposable test clusters only.
版本
| 类型 | 仓库 | 版本 | PG 大版本 | 包名 | 依赖 |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.2.0 | 1817161514 | macavity | - |
| RPM | PIGSTY | 0.2.0 | 1817161514 | macavity_$v | - |
| DEB | PIGSTY | 0.2.0 | 1817161514 | postgresql-$v-macavity | - |
| OS / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.2.0 el8.x86_64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.2.0 el8.x86_64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el8.x86_64.rpm
| PIGSTY 0.2.0 el8.x86_64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el8.x86_64.rpm
| N/A | N/A |
| el8.aarch64 | PIGSTY 0.2.0 el8.aarch64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.2.0 el8.aarch64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el8.aarch64.rpm
| PIGSTY 0.2.0 el8.aarch64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el8.aarch64.rpm
| N/A | N/A |
| el9.x86_64 | PIGSTY 0.2.0 el9.x86_64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.2.0 el9.x86_64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el9.x86_64.rpm
| PIGSTY 0.2.0 el9.x86_64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el9.x86_64.rpm
| N/A | N/A |
| el9.aarch64 | PIGSTY 0.2.0 el9.aarch64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.2.0 el9.aarch64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el9.aarch64.rpm
| PIGSTY 0.2.0 el9.aarch64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el9.aarch64.rpm
| N/A | N/A |
| el10.x86_64 | PIGSTY 0.2.0 el10.x86_64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.2.0 el10.x86_64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el10.x86_64.rpm
| PIGSTY 0.2.0 el10.x86_64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el10.x86_64.rpm
| N/A | N/A |
| el10.aarch64 | PIGSTY 0.2.0 el10.aarch64.pg18 : macavity_18 macavity_18-0.2.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.2.0 el10.aarch64.pg17 : macavity_17 macavity_17-0.2.0-1PGSTY.el10.aarch64.rpm
| PIGSTY 0.2.0 el10.aarch64.pg16 : macavity_16 macavity_16-0.2.0-1PGSTY.el10.aarch64.rpm
| N/A | N/A |
| d12.x86_64 | PIGSTY 0.2.0 d12.x86_64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.2.0 d12.x86_64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~bookworm_amd64.deb
| PIGSTY 0.2.0 d12.x86_64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~bookworm_amd64.deb
| N/A | N/A |
| d12.aarch64 | PIGSTY 0.2.0 d12.aarch64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.2.0 d12.aarch64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~bookworm_arm64.deb
| PIGSTY 0.2.0 d12.aarch64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~bookworm_arm64.deb
| N/A | N/A |
| d13.x86_64 | PIGSTY 0.2.0 d13.x86_64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.2.0 d13.x86_64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~trixie_amd64.deb
| PIGSTY 0.2.0 d13.x86_64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~trixie_amd64.deb
| N/A | N/A |
| d13.aarch64 | PIGSTY 0.2.0 d13.aarch64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.2.0 d13.aarch64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~trixie_arm64.deb
| PIGSTY 0.2.0 d13.aarch64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~trixie_arm64.deb
| N/A | N/A |
| u22.x86_64 | PIGSTY 0.2.0 u22.x86_64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.2.0 u22.x86_64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~jammy_amd64.deb
| PIGSTY 0.2.0 u22.x86_64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~jammy_amd64.deb
| N/A | N/A |
| u22.aarch64 | PIGSTY 0.2.0 u22.aarch64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.2.0 u22.aarch64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~jammy_arm64.deb
| PIGSTY 0.2.0 u22.aarch64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~jammy_arm64.deb
| N/A | N/A |
| u24.x86_64 | PIGSTY 0.2.0 u24.x86_64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.2.0 u24.x86_64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~noble_amd64.deb
| PIGSTY 0.2.0 u24.x86_64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~noble_amd64.deb
| N/A | N/A |
| u24.aarch64 | PIGSTY 0.2.0 u24.aarch64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.2.0 u24.aarch64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~noble_arm64.deb
| PIGSTY 0.2.0 u24.aarch64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~noble_arm64.deb
| N/A | N/A |
| u26.x86_64 | PIGSTY 0.2.0 u26.x86_64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.2.0 u26.x86_64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~resolute_amd64.deb
| PIGSTY 0.2.0 u26.x86_64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~resolute_amd64.deb
| N/A | N/A |
| u26.aarch64 | PIGSTY 0.2.0 u26.aarch64.pg18 : postgresql-18-macavity postgresql-18-macavity_0.2.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.2.0 u26.aarch64.pg17 : postgresql-17-macavity postgresql-17-macavity_0.2.0-1PGSTY~resolute_arm64.deb
| PIGSTY 0.2.0 u26.aarch64.pg16 : postgresql-16-macavity postgresql-16-macavity_0.2.0-1PGSTY~resolute_arm64.deb
| N/A | N/A |
构建
您可以使用 pig build 命令构建 macavity 扩展的 RPM / DEB 包:
安装
您可以直接安装 macavity 扩展包的预置二进制包,首先确保 PGDG 和 PIGSTY 仓库已经添加并启用:
使用 pig 或者是 apt/yum/dnf 安装扩展:
创建扩展:
用法
来源:
macavity 0.2.0 为可丢弃的 PostgreSQL 测试集群提供确定性故障注入。上游在 Linux 上测试 PostgreSQL 16–18,尚未验证 PostgreSQL 19+ 及其他平台,Windows 不支持崩溃注入。崩溃动作可能断开所有会话并触发崩溃恢复。
事件用法
事件表与升级
每个会话保存多个事件,各有固定 ID、独立计数及 armed、completed 或 disarmed 状态。macavity_arm 返回整数事件 ID;仅接收 ID 的重载会重新启用已完成或已停用事件。macavity_status 返回零到多行事件。macavity_disarm 保留事件历史,macavity_reset 则清空历史并重置 ID。
注入点为 executor_start、executor_end、before_commit 与 before_abort,动作为 error、delay 与 crash。延迟固定一秒,回滚期间不允许注入错误。同一次命中按延迟、崩溃、错误的顺序处理,同类事件按 ID 排序。
创建需要超级用户,无需共享预加载。只有注入点枚举向 PUBLIC 开放。使用 ALTER EXTENSION macavity UPDATE 升级会以新签名重新创建函数:须恢复显式授权、修改调用方并重新连接旧会话。当前 Pigsty 打包字段仍对应 0.1.0。
这个页面对您有帮助吗?
感谢反馈,我们会据此改进这篇文档。
哪里没有解决?(可选)