Re: [HACKERS] pg_stat_database deadlock counter

2012-01-26 Thread Magnus Hagander
On Sun, Jan 22, 2012 at 19:35, Jaime Casanova ja...@2ndquadrant.com wrote: On Mon, Jan 16, 2012 at 3:19 PM, Magnus Hagander mag...@hagander.net wrote: Attached patch adds a counter for number of deadlocks in a database to pg_stat_database. A little review: - it applies with a few hunks -

Re: [HACKERS] pg_stat_database deadlock counter

2012-01-22 Thread Jaime Casanova
On Mon, Jan 16, 2012 at 3:19 PM, Magnus Hagander mag...@hagander.net wrote: Attached patch adds a counter for number of deadlocks in a database to pg_stat_database. A little review: - it applies with a few hunks - the oid you have chosen for the function pg_stat_get_db_deadlocks() is already

[HACKERS] pg_stat_database deadlock counter

2012-01-16 Thread Magnus Hagander
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