RE: [Proposal] Add foreign-server health checks infrastructure
Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com>
From: "Hayato Kuroda (Fujitsu)" <kuroda.hayato@fujitsu.com>
To: 'Tom Lane' <tgl@sss.pgh.pa.us>
Cc: 'vignesh C' <vignesh21@gmail.com>, "pgsql-hackers@lists.postgresql.org" <pgsql-hackers@lists.postgresql.org>, Önder Kalacı <onderkalaci@gmail.com>, Fujii Masao <masao.fujii@oss.nttdata.com>, "Shinya11.Kato@oss.nttdata.com" <Shinya11.Kato@oss.nttdata.com>, Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Date: 2023-01-10T16:26:00Z
Lists: pgsql-hackers
Attachments
- v23-0001-Add-PQConncheck-to-libpq.patch (application/octet-stream) patch v23-0001
- v23-0002-postgres_fdw-add-postgres_fdw_verify_connection_.patch (application/octet-stream) patch v23-0002
- v23-0003-add-test.patch (application/octet-stream) patch v23-0003
Dear tom, > I think that it's a really bad idea to require postgres_fdw.sql > to have two expected-files: that will be a maintenance nightmare. > Please put whatever it is that needs a variant expected-file > into its own, hopefully very small and seldom-changed, test script. > Or rethink whether you really need a test case that has > platform-dependent output. Thank you for giving the suggestion. I agreed your saying and modifed that. I added new functions on the libpq and postgres-fdw layer that check whether the checking works well or not. In the test, at first, the platform is checked and the checking function is called only when it is supported. An alternative approach is that PQCanConncheck() can be combined with PQConncheck(). This can reduce the libpq function, but we must define another returned value to the function like -2. I was not sure which approach was better. Best Regards, Hayato Kuroda FUJITSU LIMITED
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