title: How to close idle connections in PostgreSQL automatically?
body: <p>Some clients connect to our postgresql database but leave the connections opened.
  Is it possible to tell Postgresql to close those connection after a certain amount of inactivity ?</p>
  <p><strong>TL;DR</strong></p>
  <blockquote>
  <p>IF you're using a Postgresql version &gt;= <code>9.2</code><br>
  THEN use <a href="https://stackoverflow.com/a/30769511/363573">the solution I came up with</a> <br></p>
  <p>IF you don't want to write any code<br>
  THEN use <a href="https://stackoverflow.com/a/12403753/363573">arqnid's solution</a></p>
  <p>IF you don't want to write any code<br>
  AND you're using a Postgresql version &gt;= <code>14</code><br>
  THEN use <a href="https://stackoverflow.com/a/69528572/363573">Laurenz Albe's solution</a>
  <br></p>
  </blockquote>