pg_terminator released

I just released first version of pg_terminator.

It's a tool that is supposed to be run on PostgreSQL db server, monitor a database, and cancel or terminate offending queries/connections.

It can be used, for example to:

  • kill leftover psql sessions that are not doing anything
  • cancel too long queries on production servers
  • kill connections that have long idle-in-transaction state
  • make sure that some application will not use transactions longer than “x"
  • and more …

Basically – if you can write a where condition, that operates on pg_stat_activity view, that can list backends to cancel/terminate – you can make pg_terminate do it for you.

To work, it requires Ruby, and its Pg library.

Usage is free, and it's fully open-source (BSD license).

Waiting for 9.6 – Add idle_in_transaction_session_timeout.

On 16th of March, Robert Haas committed patch:

Add idle_in_transaction_session_timeout.
 
Vik Fearing, reviewed by Stéphane Schildknecht and me, and revised
slightly by me.

Continue reading Waiting for 9.6 – Add idle_in_transaction_session_timeout.