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 ?
TL;DR
IF you're using a Postgresql version >=
9.2
THEN use the solution I came up withIF you don't want to write any code
THEN use arqnid's solutionIF you don't want to write any code
AND you're using a Postgresql version >=14
THEN use Laurenz Albe's solution