pg_crash
pg_crash
pg_crash : Send random signals to random processes
Overview
| ID | Extension | Package | Version | Category | License | Language |
|---|---|---|---|---|---|---|
| 5210 | pg_crash
|
pg_crash
|
1.0 |
ADMIN
|
BSD 3-Clause
|
C
|
| Attribute | Has Binary | Has Library | Need Load | Has DDL | Relocatable | Trusted |
|---|---|---|---|---|---|---|
--sL---
|
No
|
Yes
|
Yes
|
No
|
no
|
no
|
| Relationships | |
|---|---|
| See Also | pg_snakeoil
pg_cheat_funcs
pg_savior
pg_dirtyread
pg_surgery
pg_repack
pg_rewrite
pg_squeeze
|
Packages
| Type | Repo | Version | PG Major Compatibility | Package Pattern | Dependencies |
|---|---|---|---|---|---|
| EXT | PIGSTY
|
1.0 |
18
17
16
15
14
|
pg_crash |
- |
| RPM | PIGSTY
|
1.0 |
18
17
16
15
14
|
pg_crash_$v |
- |
| DEB | PIGSTY
|
1.0 |
18
17
16
15
14
|
postgresql-$v-pg-crash |
- |
| Linux / PG | PG18 | PG17 | PG16 | PG15 | PG14 |
|---|---|---|---|---|---|
el8.x86_64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
el8.aarch64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
el9.x86_64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
el9.aarch64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
el10.x86_64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
el10.aarch64
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
d12.x86_64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
d12.aarch64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
d13.x86_64
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
d13.aarch64
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
PGDG 0.3
|
u22.x86_64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
u22.aarch64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
u24.x86_64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
u24.aarch64
|
PGDG 0.3
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
PIGSTY 1.0
|
Source
pig build pkg pg_crash; # build rpm/debInstall
Make sure PGDG and PIGSTY repo available:
pig repo add pgsql -u # add both repo and update cacheInstall this extension with pig:
pig install pg_crash; # install via package name, for the active PG version
pig install pg_crash -v 18; # install for PG 18
pig install pg_crash -v 17; # install for PG 17
pig install pg_crash -v 16; # install for PG 16
pig install pg_crash -v 15; # install for PG 15
pig install pg_crash -v 14; # install for PG 14Config this extension to shared_preload_libraries:
shared_preload_libraries = 'pg_crash';This extension does not need CREATE EXTENSION DDL command
Usage
pg_crash is a chaos engineering extension that periodically sends kill signals to PostgreSQL backend processes, useful for HA and failover testing. It must be added to shared_preload_libraries.
Configuration
Add to postgresql.conf:
shared_preload_libraries = 'pg_crash'
# POSIX signals to send (space-separated)
crash.signals = '1 2 3'
# Delay in seconds between sending signals
crash.delay = 30Signal Reference
Common POSIX signals: 1 (SIGHUP), 2 (SIGINT), 3 (SIGQUIT), 9 (SIGKILL), 15 (SIGTERM).
After configuring, restart the server. The background worker will periodically send the configured signals to random backend processes at the specified interval.
Last updated on