Hello Ryohei-san,

About the backend v11 patch.

Patch applies cleanly, though compiles with a warning.
Make check ok, although the feature is not tested.

I'm okay with exposing this parameter.

Documentation:

ISTM this is not about libpq connections but about TCP connections. There can be non libpq implementations client side.

No space or newline before ";". Same comment about the libpq_ timeout.

If the parameter has no effect on Windows, I do not see why its value should be constrained to zero, it should just have no effect. Idem libpq_ timeout.

There is an error in the code, I think it should be < 0 to detect errors.

 pqcomm.c: In function ‘pq_settcpusertimeout’:
 pqcomm.c:1939:42: warning: ‘<<’ in boolean context, did you mean ‘<’ ? 
[-Wint-in-bool-context]
   if (setsockopt(port->sock, IPPROTO_TCP, TCP_USER_TIMEOUT,
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      (char *) &timeout, sizeof(timeout)) << 0 && errno != ENOPROTOOPT)
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~

The default postgres configuration file should be updated to reflect the parameter and its default value.

--
Fabien.

Reply via email to