check_postgres icon indicating copy to clipboard operation
check_postgres copied to clipboard

check for blocking locks

Open miraclesvenni opened this issue 5 years ago • 2 comments

lockwait.patch.zip

Added a check I thought was missing.

It checks for locks which have been blocking for more than specified time.

Tested on 9.6 and 10.6

miraclesvenni avatar Dec 05 '18 17:12 miraclesvenni

Hi @miraclesvenni — is there a minimum version for this check? If so I'd love to see a check to enforce that.

machack666 avatar Dec 10 '18 18:12 machack666

Hello @machack666

I have tested the SQL, it works on 9.4.24 and 10.10. So it probably works for all versions between those.

As 9.3 is not supported any more since 2018, I assume it's OK to state that we need 9.4 for this patch and not go back in time to see if it works with 9.3.

I have to add that this patch is really of value for us - --action locks option only tells you there are locks, which are not an issue by themselves - so you get a lot of false positives. The alternative implemented is this patch is actually telling you that some requests are blocked, and that's 95% of the issues we get in production where I work.

omacchioni avatar Dec 06 '19 09:12 omacchioni