Re: [Proposal] Add foreign-server health checks infrastructure
Fujii Masao <masao.fujii@oss.nttdata.com>
From: Fujii Masao <masao.fujii@oss.nttdata.com>
To: "kuroda.hayato@fujitsu.com" <kuroda.hayato@fujitsu.com>
Cc: "pgsql-hackers@lists.postgresql.org"
<pgsql-hackers@lists.postgresql.org>,
'Shinya Kato' <Shinya11.Kato@oss.nttdata.com>,
"zyu@yugabyte.com" <zyu@yugabyte.com>
Date: 2022-02-01T14:51:54Z
Lists: pgsql-hackers
On 2022/02/01 13:37, kuroda.hayato@fujitsu.com wrote: > Dear Fujii-san, > > Thank you for reviewing! I attached the latest version. Thanks! > Indeed and it should be avoided. I added a counter to CheckingRemoteServersCallbackItem. > The register function returns the registered item, and it must be set as the argument for > enable and disable functions. > Callback functions will be called when item->counter is larger than zero. This logic sounds complicated to me. I'm afraid that FDW developers may a bit easily misunderstand the logic and make the bug in their FDW. Isn't it simpler to just disable the timeout in core whenever the transaction ends whether committed or aborted, like statement_timeout is disabled after each command? For example, call something like DisableForeignCheckTimeout() in CommitTransaction() etc. > You are right. I think this suggests that error-reporting should be done in the core layer. > For meaningful error reporting, I changed a callback specification > that it should return ForeignServer* which points to downed remote server. This approach seems to assume that FDW must manage all the ForeignServer information so that the callback can return it. Is this assumption valid for all the FDW? How about making FDW trigger a query cancel interrupt by signaling SIGINT to the backend, instead? Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION
Commits
-
postgres_fdw: Extend postgres_fdw_get_connections to return user name.
- 4f08ab554577 18.0 landed
-
postgres_fdw: Fix bug in connection status check.
- 454aab4b738e 18.0 landed
-
postgres_fdw: Add connection status check to postgres_fdw_get_connections().
- 857df3cef7be 18.0 landed
-
postgres_fdw: Add "used_in_xact" column to postgres_fdw_get_connections().
- c297a47c5f8d 18.0 landed
-
doc: Enhance documentation for postgres_fdw_get_connections() output columns.
- 284c030a10b8 18.0 landed
-
Avoid reference to nonexistent array element in ExecInitAgg().
- 92957ed98c5c 16.0 cited
-
Add WL_SOCKET_CLOSED for socket shutdown events.
- 50e570a59e7f 15.0 cited
-
postgres_fdw: reestablish new connection if cached one is detected as broken.
- 32a9c0bdf493 14.0 cited