Skip to content

Commit 8ef80d3

Browse files
committed
Added README
1 parent f71f6b8 commit 8ef80d3

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

README.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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+

0 commit comments

Comments
 (0)