模拟crash扩展 pg_crash
原文地址
https://github.com/cybertec-postgresql/pg_crash
原文作者
如果您的数据库太可靠 - pg_crash 可以为您杀死它。 pg_crash 是 PostgreSQL 的一个扩展,它允许您通过向您的数据库进程发送终止(或其他)信号并使它们失败来定期或随机地使您的数据库基础设施崩溃。它是 HA 和故障转移测试的理想选择。
适用于 Postgres = 10.0。
12.1 安装
下载
git clone https://github.com/cybertec-postgresql/pg_crash.git
- Build the extension
PG_CONFIG=/opt/pgsql/bin/pg_config make sudo PG_CONFIG=/opt/pgsql/bin/pg_config make install
复制
NB! Replace /opt/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
最后修改时间:2022-03-31 15:35:57
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
文章被以下合辑收录
评论
目录