Add script from jberkus to kill idle/locked transactions and log information about them on db-koji01

This commit is contained in:
Kevin Fenzi 2016-04-13 17:46:12 +00:00
parent 0b926eed53
commit f0d34369c5
3 changed files with 100 additions and 0 deletions

View file

@ -89,6 +89,24 @@
- cron
- postgresql
- name: install script to kill long running pgsql jobs
copy: >
src=kill_idle_xact_92.sh
dest=/usr/local/bin/kill_idle_xact_92.sh
when: inventory_hostname.startswith('db-koji01')
tags:
- cron
- postgresql
- name: Set up a cron job to kill long postresql queries
copy: >
src=koji-cleanup-locks.cron
dest=/etc/cron.d/koji-cleanup-locks.cron
when: inventory_hostname.startswith('db-koji01')
tags:
- cron
- postgresql
- name: Set up a script for cron job to clean long fas sessions on fas database server only
copy: >
src=fasdb-cleanup-sessions