From: | Magnus Hagander <magnus(at)hagander(dot)net> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pg_stat_database deadlock counter |
Date: | 2012-01-16 20:19:27 |
Message-ID: | CABUevExaBznSvZ-kuUS9SPg8pQnAGhYBzLeR6ULgjc_E7Rv-4Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Attached patch adds a counter for number of deadlocks in a database to
pg_stat_database.
While not enough to diagnose a problem on it's own, this is an easy
way to get an indicator when for when you need to go look in the logs
for details. Overhead should be very small - one counter per database
is not enough to bloat the statsfile,and if you have enough deadlocks
that the sendinf of the messages actually cause a performance
overhead, you have a bigger problem...
Comments?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
Attachment | Content-Type | Size |
---|---|---|
pg_stat_database_deadlock.patch | text/x-patch | 18.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Dimitri Fontaine | 2012-01-16 20:43:02 | Re: SKIP LOCKED DATA |
Previous Message | Dimitri Fontaine | 2012-01-16 20:01:19 | Re: PL/Python result metadata |