Toggle navigation
类型: integer
默认: 0
最低限度: 0
最大: 2147483647
上下文: user
重新开始: false

指定与客户端的服务器连接被认为死掉之前允许丢失的 TCP keepalive 数量。0 值表示使用系统默认值。这个参数只有在支持TCP_KEEPCNT或等效套接字选项的系统上才可以使用。在其他系统上,必须为零。在通过 Unix 域套接字连接的会话中,这个参数被忽略并总被读作零。

Windows 不支持该参数,且必须为零。

建议 [EN]

The three tcp_keepalive settings help manage a system which tends to have "undead" connection/query processes. For systems which support them, you can regulate checking that connections are still "live" end-to-end to kill them off. Not needed if you're not having a problem. Should be synchronized with the new TCP keepalive support in libpq on the client side.