请问各位:postgresql中在成功连接后,是否会超时自动断开连接?像mysql中有inactive_timeout(wait_timeout)来控制。

解决方案 »

  1.   

    只找到这个statement_timeout
    sql语句的执行超时时间
      

  2.   

    找到了,与你分享.
    超时不是在Server端设的,需要在连接驱动里设定.如果你用JDBC的话.
    看http://jdbc.postgresql.org/documentation/81/connect.html
    最下面
    loginTimeout = int
    Specify how long to wait for establishment of a database connection. The timeout is specified in seconds如果是用.net有相应的Timeout=?来设置.
    其它可参看到postgresql.org看相应的连接驱动文档.楼主给分哦.