How to close idle connections in PostgreSQL automatically?
For those who are interested, here is the solution I came up with, inspired from Craig Ringer’s comment: (…) use a cron job to look at when the connection was last active (see pg_stat_activity) and use pg_terminate_backend to kill old ones.(…) The chosen solution comes down like this: First, we upgrade to Postgresql 9.2. Then, … Read more