1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-05 00:28:52 +02:00

TCP keep-alive options are configurable.

Prior to 2.25 the individual TCP keep-alive options were not being configured due to a missing header. In 2.25 they were being configured incorrectly due to a disconnect between the timeout specified in ms and what was expected by the TCP options, i.e. seconds.

Instead make the TCP keep-alive options directly configurable, with correct units and better testing. Keep-alive is enabled by default (though it can be defaulted to the system setting instead) and the rest of the options are not set by default. This is in line with what PostgreSQL does, though PostgreSQL does not allow keep-alive to be defaulted.

Also move configuration of TCP options before connect() as PostgreSQL does.
This commit is contained in:
David Steele
2020-03-31 18:13:11 -04:00
parent 8989118cc6
commit 5c6fb88bef
18 changed files with 683 additions and 41 deletions

View File

@ -164,6 +164,10 @@ testRun(void)
" [default=1]\n"
" --protocol-timeout protocol timeout [default=1830]\n"
" --stanza defines the stanza\n"
" --tcp-keep-alive keep-alive enable [default=y]\n"
" --tcp-keep-alive-count keep-alive count\n"
" --tcp-keep-alive-idle keep-alive idle time\n"
" --tcp-keep-alive-interval keep-alive interval time\n"
"\n"
"Log Options:\n"
"\n"