Skip to content
Please note that GitHub no longer supports Internet Explorer.

We recommend upgrading to the latest Microsoft Edge, Google Chrome, or Firefox.

Learn more
"Chaos Monkey" Extension for PostgreSQL databases
C Makefile
Branch: master
Clone or download
hans-jürgen schönig
hans-jürgen schönig fix website
Latest commit e2815bd Feb 2, 2020
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
Makefile First version - checked with 9.6 and 10.0 Oct 26, 2017
README.md fix website Feb 2, 2020
pg_crash.c
pg_crash.control

README.md

pg_crash

If your database is too reliable - pg_crash can kill it for you. pg_crash is an extension to PostgreSQL, which allows you to periodically or randomly crash your database infrastructure by sending kill (or other) signals to your DB processes and make them fail. It is ideal for HA and failover testing.

Works with Postgres 10.0.

Installation

  • Build the extension
PG_CONFIG=/usr/local/pgsql/bin/pg_config make
sudo PG_CONFIG=/usr/local/pgsql/bin/pg_config make install

NB! Replace /usr/local/pgsql/bin with your desired binary

  • Edit server config

Add 'pg_crash to shared_preload_libraries and configure signals and timeouts

shared_preload_libraries = ',pg_crash'
# any POSIX signals you want to emit from the background worker
crash.signals = '1 2 3'
# set delay (in seconds) between sending signals
crash.delay = 30
  • restart the server

Have fun troubleshooting!

Developer Credits

Antonin Houska, Cybertec Schönig & Schönig GmbH. Visit our website: www.cybertec-postgresql.com

You can’t perform that action at this time.