sfackler / rust-postgres

Native PostgreSQL driver for the Rust programming language
Apache License 2.0
3.44k stars 436 forks source link

wire through knob for TCP user timeout #1007

Closed pH14 closed 1 year ago

pH14 commented 1 year ago

TCP user timeouts are pretty useful, especially in conjunction with the existing connect timeout / keepalive settings. This adds a new config value, allowing us to set a user timeout on the socket similar to the keepalive setting.

sfackler commented 1 year ago

Does this setting exist in psql? I would prefer to mirror its configuration options.

pH14 commented 1 year ago

It should! It's one of the libpq params: https://www.postgresql.org/docs/15/libpq-connect.html#LIBPQ-PARAMKEYWORDS

sfackler commented 1 year ago

Oh nice, I totally missed that somehow...

sfackler commented 1 year ago

Thanks!

pH14 commented 1 year ago

🙇 thank you @sfackler!

benesch commented 1 year ago

Oh nice, I totally missed that somehow...

(It's new in v12, so you might've been looking at an old version of the docs.)