File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed
Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change 1+ # pg\_ crash
2+
3+ A Postgres extension to send kill (or other) signal after some interval. Useful for testing HA failover scenarios.
4+
5+ # Installation
6+
7+ * Build the extension
8+
9+ ```
10+ PG_CONFIG=/usr/local/pgsql/bin/pg_config make
11+ sudo PG_CONFIG=/usr/local/pgsql/bin/pg_config make install
12+ ```
13+ NB! Replace /usr/local/pgsql/bin with your wished binary
14+
15+ * Edit server config
16+
17+ Add 'pg\_ crash to shared\_ preload\_ libraries and configure signals and timeouts
18+
19+
20+ ```
21+ shared_preload_libraries = ',pg_crash'
22+ # any POSIX signals you want to emit from the background worker
23+ crash.signals = '1 2 3'
24+ # set delay (in seconds) between sending signals
25+ crash.delay = 30
26+ ```
27+
28+ * restart the server
29+
30+
31+ ## Have fun troubleshooting!
32+
You can’t perform that action at this time.
0 commit comments