diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index afbb6c35e3..08c372db63 100644 --- a/doc/src/sgml/config.sgml +++ b/doc/src/sgml/config.sgml @@ -1012,9 +1012,9 @@ include_dir 'conf.d' the kernel reports that the connection is closed. - This option is currently available only on systems that support the - non-standard POLLRDHUP extension to the - poll system call, including Linux. + This option relies on kernel events exposed by Linux, macOS, illumos + and the BSD family of operating systems, and is not currently available + on other systems. If the value is specified without units, it is taken as milliseconds. @@ -1035,6 +1035,25 @@ include_dir 'conf.d' + + remote_servers_connection_check_interval (integer) + + remote_servers_connection_check_interval configuration parameter + + + + + Sets the time interval between optional checks that the remote servers + are still alive. If this parameter is set to a valid value, registered + callback functions are executed at the specified time interval. + If your FDW extension does not implement a callback function, nothing + happens after the specified amount of time. If the value is specified + without units, it is taken as milliseconds. The default value is + 0, this means the feature is disabled. + + + + diff --git a/doc/src/sgml/fdwhandler.sgml b/doc/src/sgml/fdwhandler.sgml index dbf5dd3d15..38e67730bf 100644 --- a/doc/src/sgml/fdwhandler.sgml +++ b/doc/src/sgml/fdwhandler.sgml @@ -2136,4 +2136,28 @@ GetForeignServerByName(const char *name, bool missing_ok); + + Checking the Health of Remote Servers via Foreign Data Wrapper + + + For verifying the health of remote servers, callback functions can be + registered that runs periodically. The time interval is controlled by + . + The API for registering functions is: + +void +RegisterCheckingRemoteServersCallback(CheckingRemoteServersCallback callback, void *arg); + + Only functions that return void can be registered as callback functions. + Please set to void* arg a pointer if you want to pass an argument. + If you have problems with the health check results and want to + abort the transaction, please execute ereport(ERROR) + in the callback function. + Note that callback functions will be released at end of each transaction. + Please register callback functions every time you connect to remote servers. + + + + +