gpdb icon indicating copy to clipboard operation
gpdb copied to clipboard

Add support TCP user timeout in libpq and the backend server

Open x4m opened this issue 3 years ago • 2 comments

This is a draft of a backport of 249d64999 Postgres commit with tcp_user_timeout.

x4m avatar Dec 11 '21 07:12 x4m

If I may ask, what issue/limitation did you encounter to need this feature backported?

AFAIR there are infinite timeouts in libpq which led to some incidents in the production of our services. That's why our setup guide contains recommendations to adjust keepalives and TCP user timeout. When we are receiving a message libpq relies on OS detecting TCP failure. But OS can wait for a very long time unless tcp user timeout is configured.

Maybe @efimkin could add some info on why do we want this setting.

I'll fix the PR after vacation, thanks for the review @jimmyyih !

x4m avatar Dec 22 '21 11:12 x4m

@x4m please address the comments posted by Jimmy and resolve the conflicts reported for the PR, then we can go ahead to commit the same.

ashwinstar avatar Sep 03 '22 00:09 ashwinstar