macavity
macavity : Deterministic session-local fault injection for PostgreSQL test clusters
Overview
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
| --s-d-r | No | Yes | No | Yes | yes | no |
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY | 0.2.0 |
18 17 16 15 14 | macavity |
- |
| RPM | PIGSTY | 0.2.0 |
18 17 16 15 14 | macavity_$v |
- |
| DEB | PIGSTY | 0.2.0 |
18 17 16 15 14 | postgresql-$v-macavity |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
| el8.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| el8.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| el9.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| el9.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| el10.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| el10.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| d12.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| d12.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| d13.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| d13.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u22.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u22.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u24.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u24.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u26.x86_64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
| u26.aarch64 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | PIGSTY 0.2.0 | N/A | N/A |
Source
github.com/CrystallineCore/Macavity
macavity-0.2.0.tar.gz
Install
Make sure PGDG and PIGSTY repo available:
Install this extension with pig:
Create this extension with:
Usage
Sources:
macavity 0.2.0 provides deterministic fault injection for disposable PostgreSQL test clusters. Upstream tests PostgreSQL 16–18 on Linux; PostgreSQL 19+ and other platforms are not validated, and Windows crash injection is unsupported. The crash action can disconnect every session and force crash recovery.
Event workflow
Registry and upgrade
Each session keeps multiple events with stable IDs, separate counters and states armed, completed or disarmed. macavity_arm returns an integer event ID; its single-ID overload re-arms a completed or disarmed event. macavity_status returns zero or more event rows. macavity_disarm retains event history; macavity_reset clears it and restarts IDs.
Points are executor_start, executor_end, before_commit and before_abort; actions are error, delay and crash. Delay lasts one second. Abort-time error injection is rejected. At a shared hit, delay precedes crash, then error, with IDs breaking ties.
Creation requires a superuser; no shared preload is needed. Only point enumeration is granted to PUBLIC. Upgrading with ALTER EXTENSION macavity UPDATE recreates functions with changed signatures: restore explicit grants, update callers and reconnect old sessions. Current Pigsty package fields still refer to 0.1.0.