8000 GitHub - cybertec-postgresql/pg_crash at v0.3
[go: up one dir, main page]

Skip to content
  • Insights
  • cybertec-postgresql/pg_crash

    Folders and files

    NameName
    Last commit message
    Last commit date

    Latest commit

     

    History

    19 Commits
     
     
     
     
     
     
     
     
     
     
     
     
     
     

    Repository files navigation

    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 >= 11.

    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 PostgreSQL International GmbH. Visit our website: www.cybertec-postgresql.com

    About

    Periodically or randomly crash your database

    Topics

    Resources

    License

    Stars

    Watchers

    Forks

    Contributors 5

    0