RE: Timeout parameters

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: "Nagaura, Ryohei" <nagaura(dot)ryohei(at)jp(dot)fujitsu(dot)com>
Cc: "Jamison, Kirk" <k(dot)jamison(at)jp(dot)fujitsu(dot)com>, "Tsunakawa, Takayuki" <tsunakawa(dot)takay(at)jp(dot)fujitsu(dot)com>, 'Robert Haas' <robertmhaas(at)gmail(dot)com>, "MikalaiKeida(at)ibagroup(dot)eu" <MikalaiKeida(at)ibagroup(dot)eu>, "AYahorau(at)ibagroup(dot)eu" <AYahorau(at)ibagroup(dot)eu>, Michael Paquier <michael(at)paquier(dot)xyz>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: RE: Timeout parameters
Date: 2019-03-27 07:19:55
Message-ID: alpine.DEB.2.21.1903260912170.20796@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro HORIGUCHI 2019-03-27 07:36:25 Re: shared-memory based stats collector
Previous Message Thomas Munro 2019-03-27 06:55:57 txid_status() off-by-one error