Just a friendly reminder: tcp_keepalives_idle and tcp_keepalives_interval params are measured in seconds, not ms! Quick ref: https://www.postgresql.org/docs/current/runtime-config-connection.html