Hi, AFAIU TFM if i set keepalives_* parameters in a conninfo they set the internal counters to these values so if i execute:
""" conn = PQconnectdb("host=192.168.204.10 keepalives=1 keepalives_idle=45 keepalives_interval=5 keepalives_count=5"); """ that means that the client's connection to the server in 192.168.204.10 will wait 45 seconds after the last packet sent to the server and then will sent a probe every 5 seconds, 5 times... if all of the above is right then if in the client i execute a PQexec() when the connection has already drop it should detect the failure after 1 minute 10 seconds. is that right or am i misunderstanding this? the reason i ask is that when i use that exact conninfo it detects the failure condition after 15 minutes always... well, actually it waits the same time even if i doesn't set anything... i even used getsockopt() to ensure TCP_KEEPIDLE was being setted and tried to set it myself with setsockopt() with the same results. BTW, this paper (http://es.scribd.com/doc/2586622/tcpkeepalivehowto) on section "4.2. The setsockopt function call" page 9 says that to set TCP_KEEPIDLE, TCP_KEEPINTVL and TCP_KEEPCNT we should use level SOL_TCP but on src/interfaces/libpq/fe-connect.c we use IPPROTO_TCP instead. any leads? -- Jaime Casanova www.2ndQuadrant.com Professional PostgreSQL Soporte 24x7, desarrollo, capacitaciĆ³n y servicios -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers