postgres_fdw: Extend postgres_fdw_get_connections to return user name.
Fujii Masao <fujii@postgresql.org>
postgres_fdw: Extend postgres_fdw_get_connections to return user name. This commit adds a "user_name" output column to the postgres_fdw_get_connections function, returning the name of the local user mapped to the foreign server for each connection. If a public mapping is used, it returns "public." This helps identify postgres_fdw connections more easily, such as determining which connections are invalid, closed, or used within the current transaction. No extension version bump is needed, as commit c297a47c5f already handled it for v18~. Author: Hayato Kuroda Reviewed-by: Fujii Masao Discussion: https://postgr.es/m/b492a935-6c7e-8c08-e485-3c1d64d7d10f@oss.nttdata.com
Files
| Path | Change | +/− |
|---|---|---|
| contrib/postgres_fdw/connection.c | modified | +47 −10 |
| contrib/postgres_fdw/expected/postgres_fdw.out | modified | +9 −7 |
| contrib/postgres_fdw/postgres_fdw--1.1--1.2.sql | modified | +2 −1 |
| contrib/postgres_fdw/sql/postgres_fdw.sql | modified | +5 −3 |
| doc/src/sgml/postgres-fdw.sgml | modified | +18 −5 |
Documentation touched
Discussion
- [Proposal] Add foreign-server health checks infrastructure 129 messages · 2021-10-30 → 2024-09-20