Skip to content

Commit 0fcd8da

Browse files
committed
Added readme.
1 parent 7f91f2e commit 0fcd8da

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

locks/README.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Lock-Logging Scripts
2+
====================
3+
4+
Since the amount of information you can usefully get out of log_lock_waits is limited, these
5+
scripts add a way to log complex information to PostgreSQL tables.
6+
7+
1. Run table_locks_setup.sql and transaction_locks_setup.sql against the target database
8+
This will create 2 tables and 2 functions for logging.
9+
10+
2. Add a cron job to execute log_locks.sh every 1 to 10 minutes.
11+
12+
Note that, under pathological conditions, querying the locks tables can have significant overhead,
13+
and the lock logging query itself can become blocked or bog down. For that reason, we recommend
14+
discretion on how frequently you run the cron job.

0 commit comments

Comments
 (0)