pg_stat_database deadlock counter - Mailing list pgsql-hackers

From Magnus Hagander
Subject pg_stat_database deadlock counter
Date
Msg-id CABUevExaBznSvZ-kuUS9SPg8pQnAGhYBzLeR6ULgjc_E7Rv-4Q@mail.gmail.com
Whole thread Raw
Responses Re: pg_stat_database deadlock counter  (Jaime Casanova <jaime@2ndquadrant.com>)
List 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

pgsql-hackers by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: PL/Python result metadata
Next
From: Dimitri Fontaine
Date:
Subject: Re: SKIP LOCKED DATA