pg_stat_database deadlock counter
Magnus Hagander <magnus@hagander.net>
From: Magnus Hagander <magnus@hagander.net>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-01-16T20:19:27Z
Lists: pgsql-hackers
Attachments
- pg_stat_database_deadlock.patch (text/x-patch) patch
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/